Popup: Ensure all popups can be closed by esc key.

This commit is contained in:
Matt Lee
2015-11-12 15:55:58 -08:00
committed by Florence Yeun
parent 7923552c1f
commit 2777faefba

View File

@@ -70,6 +70,10 @@
listener.trigger(tuple[1]);
});
});
// ensures element is 'focusable', otherwise closing with esc key only
// works when an input inside the modal is focused.
$el.attr('tabindex', $el.attr('tabindex') || 0);
};
[