Skip to content

Commit

Permalink
chore: better use of DOM element creation and innerHTML (#770)
Browse files Browse the repository at this point in the history
- also remove `passive` mode to certain events that use preventDefault since that is not compatible with `passive` mode
  • Loading branch information
ghiscoding committed Jul 8, 2023
1 parent 82fb150 commit 1bc24ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slick.interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
function destroy() {
if (resizeableHandleElement && typeof resizeableHandleElement.removeEventListener === 'function') {
resizeableHandleElement.removeEventListener('mousedown', resizeStartHandler);
resizeableHandleElement.removeEventListener('touchstart', resizeStartHandler, Slick.Utils.enablePassiveWhenSupported());
resizeableHandleElement.removeEventListener('touchstart', resizeStartHandler);
}
}

Expand Down Expand Up @@ -247,7 +247,7 @@

// add event listeners on the draggable element
resizeableHandleElement.addEventListener('mousedown', resizeStartHandler);
resizeableHandleElement.addEventListener('touchstart', resizeStartHandler, Slick.Utils.enablePassiveWhenSupported());
resizeableHandleElement.addEventListener('touchstart', resizeStartHandler);

return { destroy };
}
Expand Down

0 comments on commit 1bc24ad

Please sign in to comment.