debiki / utterscroll

Enables dragscroll on your website. Automatically detects when you want to select text, not scroll.
34 stars 8 forks source link

When height is set, horizontal no longer scross #8

Open Techgeekster opened 8 years ago

Techgeekster commented 8 years ago

When I set the height on my scrollable div (not the parent/wrapper div), the div is no longer scrollable by dragging, but it is still scrollable by using the scroll bar. Vertical scrolling seems to be working well.
I'm using Chrome, my scrollable div's position is set to relative, and my parent div's position is relative as well. I have included both jquery-scrollable.js and debiki-utterscroll.js. I'm using jquery version 1.9.1

kajmagnus commented 8 years ago

Hi, okay. I'm a bit surprised about this. If you have a look at this demo: http://rawgit.com/debiki/utterscroll/master/utterscroll-example.html and then, in Chrome Dev Tools, right click Inspect on the blue rectangle (the one a the top with the text "Utterscroll works in nested scrollbars" inside), you'll notice it has it's height specified:

style="width:800px; height:400px; background-color: blue; position:relative; left:100px; overflow: scroll"

but still it's possible to drag-scroll it both horizontally & vertically.

It could perhaps be helpful if you copy pasted the relevant HTML and CSS here? (not the whole page, but perhaps it's possible to copy-paste only the part of the page where the problem happens?)

(the example above uses jQuery 2.0 not 1.9 though)

If you want to and have the time, perhaps you'd like to copy the above-mentioned http://rawgit.com/debiki/utterscroll/master/utterscroll-example.html and see if you can reproduce the problem? (I'm not sure when I would have time to fix it, I'm doing fairly much other stuff right now, but at least it seems interesting to try to find out what's happening)