Fix console errors with closing settings.

We were mapping the escape key to fake-click a redundant
click handler when the settings pages were open.  This fix
lets the actual click handling work via modals.js, and it
lets keyboard handling directly calls modals.close_settings().
This commit is contained in:
Steve Howell 2017-05-09 14:20:37 -07:00 committed by Tim Abbott
parent bd3e338c35
commit 23b7be90c2
2 changed files with 1 additions and 8 deletions

View File

@ -659,13 +659,6 @@ $(function () {
$(".settings-section" + sel + ", .settings-wrapper" + sel).addClass("show");
});
$("#settings_overlay_container").on("click", function (e) {
var $target = $(e.target);
if ($target.is(".exit-sign, .exit")) {
hashchange.exit_modal();
}
});
(function () {
var settings_toggle = components.toggle({
name: "settings-toggle",

View File

@ -205,7 +205,7 @@ exports.process_escape_key = function (e) {
}
if (exports.is_settings_page()) {
$("#settings_overlay_container .exit").click();
modals.close_modal('settings');
return true;
}