alvarotrigo / alvarotrigo/fullPage.js
Request: Ability to Remove middle scroll button click functionality.
- Langage dominant
- JavaScript
- Étoiles
- 35.4k
- Forks
- 7.1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Is it possible to remove the middle scroll button click functionality by providing access to the function removeMiddleWheelHandler or provide an option to turn off the middle button click?
You can see the function I want to remove on fullpage.js by going to https://alvarotrigo.com/fullPage/ and clicking the middle scroll mouse button. The page moves to the next slide. It happens in all browsers. I want the option to remove this functionality.
Two Solutions are to either add removeMiddleWheelHandler to the public functions and let me call it from my page or to provide an option (middleMouseButton: true) to turn off the click and adding something like the following code to stop the event.
```
//binding the mousemove when the mouse's middle button is released
function mouseDownHandler(e){
if (options.middleMouseButton === false && e.button === 1) return false;
if (e.which == 2){
oldPageY = e.pageY;
container.addEventListener('mousemove', mouseMoveHandler);
}
}
//unbinding the mousemove when the mouse's middle button is released
function mouseUpHandler(e){
if (options.middleMouseButton === false && e.button === 1) return false;
if (e.which == 2){
container.removeEventListener('mousemove', mouseMoveHandler);
}
}
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.