mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Speed up key handling by adding modals.is_active().
The function modals.is_active() can see if modals are open without having to look at the DOM. This should make it snappier to type in the compose box. Even if the speedup is pretty minor, not having to worry about jQuery slowness should make it easier to diagnose future compose box issues. The new function gets used in other places, too, where performance isn't so much an issue.
This commit is contained in:
@@ -504,7 +504,7 @@ function welcome() {
|
||||
}
|
||||
|
||||
exports.start = function () {
|
||||
if (ui_state.home_tab_obscured()) {
|
||||
if (modals.is_active()) {
|
||||
ui_util.change_tab_to('#home');
|
||||
}
|
||||
narrow.deactivate();
|
||||
|
||||
Reference in New Issue
Block a user