FIX: ensures popover is hidden when changing route (#7300)

This commit is contained in:
Joffrey JAFFEUX 2019-04-01 16:23:57 +02:00 committed by GitHub
parent 4b1b135ede
commit 13a6a04cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,10 @@ const SELECTORS =
export default {
name: "d-popover",
initialize() {
initialize(container) {
const router = container.lookup("router:main");
router.on("routeWillChange", hidePopover);
$("#main").on("click.d-popover mouseenter.d-popover", SELECTORS, event =>
showPopover(event)
);