Skip to content

Commit

Permalink
apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
Tucchhaa committed Jan 14, 2025
1 parent 38d537f commit 1351791
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
import { isDeferred, isDefined, isEmptyObject } from '@js/core/utils/type';
import * as accessibility from '@js/ui/shared/accessibility';
import { focused } from '@js/ui/widget/selectors';
import { isElementInDom } from '@ts/core/utils/m_dom';
import type { AdaptiveColumnsController } from '@ts/grids/grid_core/adaptivity/m_adaptivity';
import type { DataController } from '@ts/grids/grid_core/data_controller/m_data_controller';
import type { EditingController } from '@ts/grids/grid_core/editing/m_editing';
Expand Down Expand Up @@ -338,9 +339,9 @@ export class KeyboardNavigationController extends modules.ViewController {
const editorOverlaySelector = `.${DROPDOWN_EDITOR_OVERLAY_CLASS}`;

// if click was on the datagrid table, but the target element is no more presented in the DOM
const keepFocus = !!$target.closest(tableSelector).length && !$target.get(0).isConnected;
const needKeepFocus = !!$target.closest(tableSelector).length && isElementInDom($target);

if (keepFocus) {
if (needKeepFocus) {
e.event.preventDefault();
return;
}
Expand Down

0 comments on commit 1351791

Please sign in to comment.