Skip to content

Commit a12c4f5

Browse files
author
Ruslan Farkhutdinov
committed
Grid: Add _ignoreCloseOnChildEscape to Popup init in columnChooser
1 parent 80c6189 commit a12c4f5

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export class ColumnChooserView extends ColumnsView {
174174
rtlEnabled: that.option('rtlEnabled'),
175175
container: columnChooserOptions.container,
176176
_loopFocus: true,
177+
_ignoreCloseOnChildEscape: true,
177178
} as PopupProperties;
178179

179180
if (!isDefined(this._popupContainer)) {

packages/devextreme/js/__internal/ui/popup/m_popup.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,9 @@ class Popup<
237237
if (this._$content && !$target.is(this._$content)
238238
&& options.keyName === ESC_KEY_NAME
239239
&& !e.isDefaultPrevented()
240-
&& !onlyChildProcessing
241240
&& !_ignoreCloseOnChildEscape) {
242241
// eslint-disable-next-line @typescript-eslint/no-floating-promises
243242
this.hide();
244-
245-
return;
246243
}
247244

248245
super._keyboardHandler(options, onlyChildProcessing);

packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2723,7 +2723,7 @@ QUnit.module('keyboard navigation', {
27232723

27242724
keyboard.keyDown('esc');
27252725

2726-
assert.strictEqual(this.popup.option('visible'), true, 'popup remains visible when _closeOnChildEscape is false');
2726+
assert.strictEqual(this.popup.option('visible'), true, 'popup remains visible when _ignoreCloseOnChildEscape is true');
27272727
});
27282728
});
27292729

0 commit comments

Comments
 (0)