popovers: Hide opened popover on navigating back.

Hides popover if it remains open and an overlay such as the settings
UI is opened via the browser back button.

Fixes: #7230.
This commit is contained in:
Shubham Dhama
2017-10-31 19:06:54 +05:30
committed by Tim Abbott
parent 5ec855967d
commit aab0eeb5cc

View File

@@ -49,6 +49,8 @@ exports.active_modal = function () {
};
exports.open_overlay = function (opts) {
popovers.hide_all();
if (!opts.name || !opts.overlay || !opts.on_close) {
blueslip.error('Programming error in open_overlay');
return;