Skip to content

Commit

Permalink
FIX: ensures popover is hidden when changing route (discourse#7300)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux authored Apr 1, 2019
1 parent 4b1b135 commit 13a6a04
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
Expand Down

0 comments on commit 13a6a04

Please sign in to comment.