]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Removed keydown handler that used to trigger open. 10023/head
authorMarius Olbertz <marius.olbertz@gmail.com>
Fri, 12 May 2017 13:45:08 +0000 (15:45 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Fri, 12 May 2017 13:45:08 +0000 (15:45 +0200)
Will trigger for space and enter automatically for buttons as anchors.
However, space will not trigger the click event for links (which is the default behavior).
As buttons should be used as anchors, this follows the specs.

Relevant for issue #10019.

js/foundation.reveal.js

index 60917381ad7dab0cd0279712dd43780e1cefc0a7..900565cc62e4df3bda8695a3ddf0f38cd007c81a 100644 (file)
@@ -148,16 +148,6 @@ class Reveal extends Plugin {
       }
     });
 
-    if (this.$anchor.length) {
-      this.$anchor.on('keydown.zf.reveal', function(e) {
-        if (e.which === 13 || e.which === 32) {
-          e.stopPropagation();
-          e.preventDefault();
-          _this.open();
-        }
-      });
-    }
-
     if (this.options.closeOnClick && this.options.overlay) {
       this.$overlay.off('.zf.reveal').on('click.zf.reveal', function(e) {
         if (e.target === _this.$element[0] ||