mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Popup: Ensure all popups can be closed by esc key.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user