2013年6月11日火曜日

jQuery UI: Solution for a problem that scrollbar does not work for selectable

If you set Selectable that have a scrollbar,
the scrollbar does not work.

e.g.
html is
div(style="height: 100; width: 100; overflow: scroll;")
    div(style="height: 1000; width: 1000;")
and javascript is
$("#out").selectable()

then, the scroll of #out does not work and only selectable works.


The solution is
$("#out").selectable({distance: 30});

Since mousedown event is not stolen by selectable but propagated to scroll, 
you can use scroll.

0 件のコメント:

コメントを投稿