close popover fix
close popover fix close popover fix close popover fix close popover fix
This commit is contained in:
Родитель
554f5419bc
Коммит
e82fdbbed6
|
@ -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
|
||||
[#1521](https://github.com/owncloud/mail/pull/1521) @tahaalibra
|
||||
|
||||
## 0.5.1 – 2016-05-30
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -65,14 +65,6 @@ define(function(require) {
|
|||
toggleCollapse: function() {
|
||||
this.collapsed = !this.collapsed;
|
||||
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) {
|
||||
e.preventDefault();
|
||||
|
@ -104,6 +96,17 @@ define(function(require) {
|
|||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче