Skip to content

Commit

Permalink
Use click to not interfere with scroll (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephane Bisson <sbisson@wikimedia.org>
  • Loading branch information
stephanebisson and Stephane Bisson authored Jul 30, 2020
1 parent 33de400 commit ea92e26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function init( {
root.querySelectorAll( selector ),
node => {
if ( isTouch ) {
node.addEventListener( 'touchend', showPopup )
node.addEventListener( 'click', showPopup )
} else {
node.addEventListener( 'mouseenter', showPopup )
}
Expand All @@ -64,7 +64,7 @@ function init( {
if ( isTouch ) {
// eslint-disable-next-line no-script-url
node.setAttribute( 'href', 'javascript:;' )
node.addEventListener( 'touchend', showPopup )
node.addEventListener( 'click', showPopup )
} else {
node.addEventListener( 'mouseenter', showPopup )
}
Expand Down

0 comments on commit ea92e26

Please sign in to comment.