Is it possible to allow click but not scroll events?
pointer-events: none;
Will disable both types of inputs, I would like to disable only scroll. Any other ideas for workarounds?
The pointer issued a scroll event. Scrolling the scroll wheel on a mouse is an example of an event that would create a PointerScrollEvent.
CSS pointer-events (for HTML) is Fully Supported on Safari 12, which means that any user who'd be accessing your page through Safari 12 can see it perfectly.
Pointer events are DOM events that are fired for a pointing device. They are designed to create a single DOM event model to handle pointing input devices such as a mouse, pen/stylus or touch (such as one or more fingers). The pointer is a hardware-agnostic device that can target a specific set of screen coordinates.
Add this css:
.stopScroll{
height:100%;
overflow:hidden;
}
Then in jQuery:
$('body').addClass('stopScroll');
Look at the fiddle:https://jsfiddle.net/26dct8o3/1/
Would help if you are looking for this. Otherwise let me know in comments if this is not what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With