-
Notifications
You must be signed in to change notification settings - Fork 76
popover should close on clicking somewhere else #1521
Conversation
By analyzing the blame information on this pull request, we identified @ChristophWurst and @Gomez to be potential reviewers |
}, | ||
toggleMenu: function(e) { | ||
e.preventDefault(); | ||
this.menuShown = !this.menuShown; | ||
this.listenTo(Radio.ui, 'document:click', function(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, doesn't that mean everytime the menu is toggled, another event handler is registered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a onShow
method and move that event handler registration in there. That method is called by Marionette once a view has finished rendering and is added to the DOM.
6723be3
to
83da471
Compare
@ChristophWurst putting the listening in initialize function...does this solve the problem |
Well, did you try the |
@ChristophWurst using onShow meths , thanks for help :) !!... |
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. | |||
|
|||
## 0.5.2 - unreleased | |||
|
|||
### Fixed | |||
- Close popover on clicking somewhere else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome :-)
👍 very nice! |
oh, now there are 4 commits. Can you squash them with |
5f6440d
to
e82fdbb
Compare
ah, you're fast 🚀 |
close popover fix close popover fix close popover fix close popover fix
Fix: the popover should close when clicking somewhere else.
@Gomez @ChristophWurst