У меня есть jQuery ui перемещаемое отделение, и содержимые HTML обычно не ведут себя из-за перемещаемого.
<div id="popup"> <!-- this popup is draggable -->
This text is not selectable. When I try to select it, the popup div is dragged.
<div style="overflow:auto; height:50px">
Lots of text here, vertical scrollbar appears. But clicking the scrollbars don't work (doesn't scroll the content). Each click (mousedown-mouseup) is considered "dragging".
</div>
</div>
Как я предотвращаю перемещаемый ui для переопределения нормального поведения браузера для элементов HTML?
Вы можете отключить перетаскивание из внутреннего
$("#popup div").bind('mousedown mouseup', function(e) {
e.stopPropagation();
});
event.stopPrpagation ()
останавливает щелчок по внутреннему < div>
от всплывающего до внешнего
Попробуйте добавить свой div unselectable attribute = off:
<div id="popup" unselectable="off">
...
и css:
[unselectable=off] {
-moz-user-select : all;
-khtml-user-select : all;
user-select : all;
}
Я не тестировался в jQuerry.UI, но это мой обходной путь в extJs и Dojo ...