jQueryUI - Draggable Element (Span) behavior with a vertical scrollbar
I'a开发者_如何学运维m having the following problem: I created some span elements which a draggable (jQuery UI draggable component). My page has a vertical scrollbar.
The span-elements are at the bottom of the page, so that I have to scroll down.
If I begin to drag a span-element (in firefox) the element doesn't stick directly at the curser - there is a "margin" between the curser and the element, maybe 50px at the top of the curser.
This problem doesn't appear at e.g. chrome.
What could be the problem?
I had this problem and I managed to find a solution. The problem is overflow-y: scroll
which is added to the html element. This property is added by default if you're using normalize.css
.
Either remove overflow-y: scroll
completely or remove it from the html element and add it to the body element.
精彩评论