Skip to content

Commit

Permalink
fix: for iOS13 selecting wrong Dropdownitem on Touchdevices fix Dogfa…
Browse files Browse the repository at this point in the history
  • Loading branch information
wuda-io committed Sep 28, 2021
1 parent e5aa45e commit 505f8d4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions js/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,13 @@
_setupTemporaryEventHandlers() {
// Use capture phase event handler to prevent click
document.body.addEventListener('click', this._handleDocumentClickBound, true);
document.body.addEventListener('touchend', this._handleDocumentClickBound);
document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound);
this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound);
}

_removeTemporaryEventHandlers() {
// Use capture phase event handler to prevent click
document.body.removeEventListener('click', this._handleDocumentClickBound, true);
document.body.removeEventListener('touchend', this._handleDocumentClickBound);
document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound);
this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound);
}
Expand Down

0 comments on commit 505f8d4

Please sign in to comment.