Manually handle hiding of bootstrap Modals in search

Closes #13330
This commit is contained in:
Cédric Krier committed 2024-06-11 09:41:46 +02:00
1 parent 8141bec786
commit 2049c0f376
1 file changed
+7 -1
+7 -1
View File
@@ -920,8 +920,14 @@
this.title = title;
this.exclude_field = kwargs.exclude_field || null;
var dialog = new Sao.Dialog(Sao.i18n.gettext(
'Search %1', this.title), '', 'lg');
'Search %1', this.title), '', 'lg', false);
this.el = dialog.modal;
this.el.on('keydown', e => {
if (e.which == Sao.common.ESC_KEYCODE) {
e.preventDefault();
this.response('RESPONSE_CANCEL');
}
});
jQuery('<button/>', {
'class': 'btn btn-link',