mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
user settings: Fix active background links when a modal is visible.
A bug caused background links to open even when a modal in the user settings overlay was active in the foreground. This commit fixes this by disabling mouse events for the background when the modal is active, and restoring them as soon as the modal starts closing. Fixes #10654.
This commit is contained in:
@@ -723,6 +723,12 @@ exports.initialize = function () {
|
||||
popovers.hide_all();
|
||||
}
|
||||
|
||||
// If user clicks outside an active modal
|
||||
if ($('.modal.in').has(e.target).length === 0) {
|
||||
// Enable mouse events for the background as the modal closes
|
||||
$('.overlay.show').attr("style", null);
|
||||
}
|
||||
|
||||
if (compose_state.composing()) {
|
||||
if ($(e.target).closest("a").length > 0) {
|
||||
// Refocus compose message text box if link is clicked
|
||||
|
||||
Reference in New Issue
Block a user