]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Defaults the settings object to self.settings 5473/head
authorArun Ganesh <arun.planemad@gmail.com>
Sun, 20 Jul 2014 19:02:27 +0000 (00:32 +0530)
committerArun Ganesh <arun.planemad@gmail.com>
Sun, 20 Jul 2014 19:02:27 +0000 (00:32 +0530)
Closes pending issue #5282.

js/foundation/foundation.reveal.js

index ea4292fd1bffaed5e59bc45deca7ef98ba0b50ab..c462d210f41e6ce7db1e6d216e4f27837bb00cd6 100755 (executable)
       // PATCH #1: fixing multiple keyup event trigger from single key press
       self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
         var open_modal = self.S('[' + self.attr_name() + '].open'),
-            settings = open_modal.data(self.attr_name(true) + '-init');
+            settings = open_modal.data(self.attr_name(true) + '-init') || self.settings ;
         // PATCH #2: making sure that the close event can be called only while unlocked,
         //           so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window.
         if ( settings && event.which === 27  && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key