close popover fix

close popover fix

close popover fix

close popover fix
This commit is contained in:
tahaa karim 2016-06-06 16:29:54 +05:30
Родитель 554f5419bc
Коммит e82fdbbed6
2 изменённых файлов: 15 добавлений и 8 удалений

Просмотреть файл

@ -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();
}
});
}
});
});