.on('closed.fndtn.reveal', '[data-reveal]', this.close_video);
}
+ return true;
+ },
+
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_on : function (scope) {
+ var self = this;
+
// PATCH #1: fixing multiple keyup event trigger from single key press
$('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
var open_modal = $('[data-reveal].open'),
return true;
},
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_off : function (scope) {
+ $('body').off('keyup.fndtn.reveal');
+ return true;
+ },
+
open : function (target, ajax_settings) {
var self = this;
if (target) {
.data('offset', this.cache_offset(modal));
}
+ this.key_up_on(modal); // PATCH #3: turning on key up capture only when a reveal window is open
modal.trigger('open');
if (open_modal.length < 1) {
if (open_modals.length > 0) {
this.locked = true;
+ this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open
modal.trigger('close');
this.toggle_bg(modal);
this.hide(open_modals, settings.css.close, settings);