mirror of https://github.com/zulip/zulip.git
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:
parent
bd3e338c35
commit
23b7be90c2
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue