Closed (fixed)
Project:
Modal Frame API
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Feb 2012 at 07:30 UTC
Updated:
28 Nov 2013 at 18:30 UTC
Jump to comment: Most recent
I was trying to avoid to the user close the modal window using the esc key so i did this:
Drupal.behaviors.modalExample = function(context) {
Drupal.modalFrame.open({
url: Drupal.settings.basePath + 'my/menu/path/',
width: 500,
height: 350,
draggable: false,
customDialogOptions: {
closeOnEscape: false
}
});
return false;
}
But that doesn't work, after to reviewing the code seems to the "esc" key event is handle by the plugin and not by the jQuery Dialog.
So, i created a patch where before to close the child window review the jQuery Dialog option and if exists and is set as false then avoid to close the child window.
| Comment | File | Size | Author |
|---|---|---|---|
| onclose_error-1.patch | 1.17 KB | gnuget |
Comments
Comment #1
bwinett commentedWorks perfectly - thanks!
Comment #2
dsnopekTested and committed in 48617a1. It works great, thanks!