mirror of
https://github.com/moparisthebest/mail
synced 2024-12-22 23:38:48 -05:00
fix touch events in woDropdown
This commit is contained in:
parent
b4884e4956
commit
7443dcad99
@ -117,13 +117,13 @@ ngModule.directive('woDropdown', function($document, $timeout) {
|
||||
}
|
||||
}
|
||||
|
||||
elm.on('touchstart click', function(e) {
|
||||
elm.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
toggle();
|
||||
});
|
||||
|
||||
// close if user clicks button in dropdown list
|
||||
dropdown.on('touchstart.woDropdown click.woDropdown', 'button', disappear);
|
||||
dropdown.on('click.woDropdown', 'button', disappear);
|
||||
|
||||
// close if user clicks outside of dropdown and elm
|
||||
$document.on('touchstart.woDropdown click.woDropdown', function(e) {
|
||||
@ -137,8 +137,8 @@ ngModule.directive('woDropdown', function($document, $timeout) {
|
||||
|
||||
// remove event listener on document
|
||||
scope.$on('$destroy', function() {
|
||||
dropdown.off('click.woDropdown');
|
||||
$document.off('touchstart.woDropdown click.woDropdown');
|
||||
dropdown.off('touchstart.woDropdown click.woDropdown');
|
||||
});
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user