Skip to content

Commit

Permalink
preventDefault only if click was inside the datagrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Tucchhaa committed Jan 10, 2025
1 parent 1b02e19 commit a9477fc
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ export class KeyboardNavigationController extends modules.ViewController {
this._documentClickHandler = this._documentClickHandler || this.createAction((e) => {
const $target = $(e.event.target);

// if target is no more presented in the DOM, then prevent unfocusing the focused view
if (!$target.get(0).isConnected) {
// if click was on the datagrid, but the target is no more presented in the DOM
if (!$target.get(0).isConnected && $target.closest('.dx-datagrid-table').length) {
// then prevent unfocusing the focused view
e.event.preventDefault();
return;
}
Expand Down

0 comments on commit a9477fc

Please sign in to comment.