Skip to content

Commit

Permalink
Prevent clicks from closing user profile modal.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Steve Howell authored and showell committed Sep 14, 2018
1 parent 9fa5030 commit d070f55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/click_handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit d070f55

Please sign in to comment.