]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Move focus back to anchor when closed.
authorMarius Olbertz <marius.olbertz@gmail.com>
Tue, 25 Apr 2017 05:29:52 +0000 (07:29 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Tue, 25 Apr 2017 05:29:52 +0000 (07:29 +0200)
js/foundation.reveal.js

index cb1098d899a582af9f8a739420ffcf41ac08a691..821fcdd9a3b4dab9f59ee7fe7ec1072b1e575b9f 100644 (file)
@@ -416,6 +416,14 @@ class Reveal {
          window.location.hash = '';
        }
      }
+      console.log('DEF', _this.$anchor.html());
+
+     // Set focus back to anchor if modal was closed by keyboard
+     if(typeof window.whatInput === 'undefined' || window.whatInput.ask() === 'keyboard') {
+      console.log('ASDASD', _this.$anchor[0]);
+
+      _this.$anchor.focus();
+     }
   }
 
   /**