Skip to content
Snippets Groups Projects
Commit e82fdbbe authored by tahaa karim's avatar tahaa karim
Browse files

close popover fix

close popover fix

close popover fix

close popover fix

close popover fix
parent 554f5419
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. ...@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
## 0.5.2 - unreleased ## 0.5.2 - unreleased
### Fixed
- Close popover on clicking somewhere else
[#1521](https://github.com/owncloud/mail/pull/1521) @tahaalibra
## 0.5.1 – 2016-05-30 ## 0.5.1 – 2016-05-30
### Fixed ### Fixed
......
...@@ -65,14 +65,6 @@ define(function(require) { ...@@ -65,14 +65,6 @@ define(function(require) {
toggleCollapse: function() { toggleCollapse: function() {
this.collapsed = !this.collapsed; this.collapsed = !this.collapsed;
this.render(); this.render();
this.listenTo(Radio.ui, 'document:click', function(event) {
var target = $(event.target);
if (!this.$el.is(target.closest('.navigation-account'))) {
// Click was not triggered by this element -> close menu
this.menuShown = false;
this.toggleMenuClass();
}
});
}, },
toggleMenu: function(e) { toggleMenu: function(e) {
e.preventDefault(); e.preventDefault();
...@@ -104,6 +96,17 @@ define(function(require) { ...@@ -104,6 +96,17 @@ define(function(require) {
OC.Notification.show(t('mail', 'Error while deleting account.')); OC.Notification.show(t('mail', 'Error while deleting account.'));
} }
}); });
},
onShow: function() {
this.listenTo(Radio.ui, 'document:click', function(event) {
var target = $(event.target);
if (!this.$el.is(target.closest('.navigation-account'))) {
// Click was not triggered by this element -> close menu
this.menuShown = false;
this.toggleMenuClass();
}
});
} }
}); });
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment