Browse Source

fixes #262

pull/263/head
Luís Rudge 11 years ago
parent
commit
d9d583f859
1 changed files with 7 additions and 2 deletions
  1. 9
      src/modules/modal.js

9
src/modules/modal.js

@ -164,8 +164,13 @@ $.fn.modal = function(parameters) {
escapeKey = 27 escapeKey = 27
; ;
if(keyCode == escapeKey) { if(keyCode == escapeKey) {
module.debug('Escape key pressed hiding modal');
module.hide();
if(settings.closable) {
module.debug('Escape key pressed hiding modal');
module.hide();
}
else {
module.debug('Escape key pressed, but closable is set to false');
}
event.preventDefault(); event.preventDefault();
} }
}, },

Loading…
Cancel
Save