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.
}
});
- 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] ||