hotkey: Close deprecation notice on Enter keypress.

This commit is contained in:
Anupam Dagar 2018-06-02 20:28:08 +00:00 committed by Tim Abbott
parent 528d2c6b28
commit c8024cec5c
2 changed files with 2 additions and 1 deletions

View File

@ -149,6 +149,7 @@ exports.maybe_show_deprecation_notice = function (key) {
if (shown_deprecation_notices.indexOf(key) === -1) {
$('#deprecation-notice-modal').modal('show');
$('#deprecation-notice-message').text(message);
$('#close-deprecation-notice').focus();
shown_deprecation_notices.push(key);
if (localstorage.supported()) {
localStorage.setItem('shown_deprecation_notices', JSON.stringify(shown_deprecation_notices));

View File

@ -11,6 +11,6 @@
</div>
<div class="modal-footer">
<button type="button" class="button rounded" data-dismiss="modal">{{ _("Got it") }}</button>
<button type="button" class="button rounded" id="close-deprecation-notice" data-dismiss="modal">{{ _("Got it") }}</button>
</div>
</div>