mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
@@ -160,6 +160,10 @@ exports.is_editing_stream_name = function (e) {
|
|||||||
return $(e.target).is(".editable-section");
|
return $(e.target).is(".editable-section");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.is_modal_open = function () {
|
||||||
|
return $(".modal").hasClass("in");
|
||||||
|
};
|
||||||
|
|
||||||
// Returns true if we handled it, false if the browser should.
|
// Returns true if we handled it, false if the browser should.
|
||||||
exports.process_escape_key = function (e) {
|
exports.process_escape_key = function (e) {
|
||||||
var row;
|
var row;
|
||||||
@@ -168,6 +172,11 @@ exports.process_escape_key = function (e) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (exports.is_modal_open()) {
|
||||||
|
$(".modal").modal("hide").attr("aria-hidden", false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (overlays.is_active()) {
|
if (overlays.is_active()) {
|
||||||
overlays.close_active();
|
overlays.close_active();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user