mdbootstrap / perfect-scrollbar

Minimalistic but perfect custom scrollbar plugin. Get more free components with Material Design for Bootstrap UI Kit (link below)
https://perfectscrollbar.com/
MIT License
346 stars 66 forks source link

Unable to prevent scroll when arrow keys are used #34

Open Hari-Muniganti opened 4 years ago

Hari-Muniganti commented 4 years ago

Hi,

I am using vue-custom-scrollbar in an electron application. I am trying to prevent scroll when DOWN and UP arrow key is pressed. I have used e.preventDefault() and e.stopPropagation to stop scrolling but it is not working. Can you please tell me a solution for this.

KianWeihrauch commented 3 years ago

You can pass the handlers you want to use to the scrollbar. Leave out “keyboard“ and it will not be handled anymore.

scrollBar = new PerfectScrollbar(container, { handlers: ['click-rail', 'drag-thumb', 'wheel', 'touch'] });

Hope this helps.