eskimoblood / jim-knopf

:o: small JavaScript library to create knobs using SVG
http://eskimoblood.github.com/jim-knopf/
199 stars 44 forks source link

mouse dragging in bootstrap #8

Closed TPei closed 9 years ago

TPei commented 9 years ago

when using knobs with bootstrap, as soon as a knob is inside a col with a size (col-md-12 etc.), the mouse dragging stops working. It doesn't matter how many layers down the DOM the knob is inside the col.

eskimoblood commented 9 years ago

Could please create an example on jsbin so I can check this. Thanks.

TPei commented 9 years ago

sure, here you go: http://jsbin.com/wunejazoha/1/

eskimoblood commented 9 years ago

Ok, the problem is the use of offsetTop and offsetLeft to get the position of the knob container, this will fail if the container is inside a relative positioned container as bootstrap column. I will fix it by using getBoundingClientRect.

TPei commented 9 years ago

Hey, I still got this issue in Firefox. But strangely, only occasionally... Does that make any sense? Are there any known issues in Firefox?

eskimoblood commented 9 years ago

Does it relates to the scroll position?

TPei commented 9 years ago

oh, yeah, it does. Once I am scrolled completely to the top of the page it works flawlessly, if I'm not, it doesn't

TPei commented 9 years ago

Does that tell you anything? Ever experienced that "bug"?