overlays: Add popovers.hide_all call to close_overlay.

This is a prep commit for changing the bots list page to show
normal user popover instead of extended profile one.
This is added so that any open popovers are closed, if one
tries to close the overlay.

This was not needed previously because we were using modal for
showing extended user profile. Now as we would be adding popover,
we would need this to close the open popovers before closing overlay.
This commit is contained in:
sahil839 2020-06-26 16:52:11 +05:30 committed by Tim Abbott
parent 1acfb4e942
commit a33b695a21
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ exports.open_modal = function (selector) {
};
exports.close_overlay = function (name) {
popovers.hide_all();
if (name !== open_overlay_name) {
blueslip.error("Trying to close " + name + " when " + open_overlay_name + " is open.");
return;