scrolldeck.js icon indicating copy to clipboard operation
scrolldeck.js copied to clipboard

Remove space scroll

Open br0k3n opened this issue 12 years ago • 4 comments

Hi,

I love ScrollDeck, but I've a little question.

How can I avoid the scroll down when I hit the space key?

Thanks a lot :)

br0k3n avatar Nov 13 '12 19:11 br0k3n

yes.. i have the same question... any answer ? love the scrolldeck plugin..thx john polacek

gunaifitm85 avatar Nov 19 '12 09:11 gunaifitm85

i found fix for my case, actually i have a textarea inside the slide, the problem is when i hit space while focusing in the textarea the page scrolling to the next slide, now i edit the js file in line127

else if ((e.keyCode == 39 || e.keyCode == 32 || e.keyCode == 40) && currIndex != slides.length-1) {
                    scrollToSlide(getNextScrollpoint());
                }

and remove the || e.keyCode == 32 line. it did works for me when i'm focus or writing in the textarea.

gunaifitm85 avatar Nov 19 '12 10:11 gunaifitm85

Yes, that's what you can do. Thanks!

johnpolacek avatar Nov 19 '12 11:11 johnpolacek

Hello, I haven't tried it yet but I need one more tip similar to this one.

First I need to disable scrolling unless an event occurs (like a click) on a button. (Scrollbars are gone with the html {overflow:hidden}), the spacebar and arrow keys solution is written from gunaifitm85 above me (?).

Cause of that I need to have specific sized div tags so that every .slide div takes up 100% of the screen without the user being able to jump to the next one unless that event (as mentioned above).

Could you please point me at some direction? Thank you

Dimosthenis avatar Jul 03 '13 14:07 Dimosthenis