mirror of
https://github.com/moparisthebest/mail
synced 2025-02-17 23:40:22 -05:00
Merge pull request #208 from whiteout-io/dev/WO-774
fix touch events in woDropdown
This commit is contained in:
commit
92a8348ea7
@ -117,13 +117,13 @@ ngModule.directive('woDropdown', function($document, $timeout) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elm.on('touchstart click', function(e) {
|
elm.on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
toggle();
|
toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
// close if user clicks button in dropdown list
|
// 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
|
// close if user clicks outside of dropdown and elm
|
||||||
$document.on('touchstart.woDropdown click.woDropdown', function(e) {
|
$document.on('touchstart.woDropdown click.woDropdown', function(e) {
|
||||||
@ -137,8 +137,8 @@ ngModule.directive('woDropdown', function($document, $timeout) {
|
|||||||
|
|
||||||
// remove event listener on document
|
// remove event listener on document
|
||||||
scope.$on('$destroy', function() {
|
scope.$on('$destroy', function() {
|
||||||
|
dropdown.off('click.woDropdown');
|
||||||
$document.off('touchstart.woDropdown click.woDropdown');
|
$document.off('touchstart.woDropdown click.woDropdown');
|
||||||
dropdown.off('touchstart.woDropdown click.woDropdown');
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user