Prevent clicks from closing user profile modal.

We have a body-level click handler that closes
all modals if you click outside a modal.  This
code is a bit brittle, because we need to first
check that the element we clicked is not in a modal,
and our markup there isn't entirely consistent.

This is a quick fix that just adds `#user-profile-modal`
as one of the selectors to look for.

Fixes #10500
This commit is contained in:
Steve Howell
2018-09-13 11:24:42 +00:00
committed by showell
parent 9fa5030c2c
commit d070f55e00

View File

@@ -700,7 +700,7 @@ exports.initialize = function () {
}
// Dismiss popovers if the user has clicked outside them
if ($('.popover-inner, .emoji-info-popover, .app-main [class^="column-"].expanded').has(e.target).length === 0) {
if ($('.popover-inner, #user-profile-modal, .emoji-info-popover, .app-main [class^="column-"].expanded').has(e.target).length === 0) {
popovers.hide_all();
}