1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 02:42:17 -05:00

Merge pull request #208 from whiteout-io/dev/WO-774

fix touch events in woDropdown
This commit is contained in:
Tankred Hase 2014-11-29 11:58:42 +01:00
commit 92a8348ea7

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