1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-22 08:52:15 -05:00

fix touch events in woDropdown

This commit is contained in:
Mario Volke 2014-11-29 10:33:48 +01:00
parent b4884e4956
commit 7443dcad99

View File

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