开发者

jQueryUI - Draggable Element (Span) behavior with a vertical scrollbar

开发者 https://www.devze.com 2023-03-26 17:35 出处:网络
I\'a开发者_如何学运维m having the following problem: I created some span elements which a draggable (jQuery UI draggable component).

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号