javascript - Dojo moveable with a Dojo pausable -
i have div attached movable element. inside div there list of buttons accompanied scroll bar. when try drag scroll bar drag whole div around screen. in code fragment trying moveable turn off when click on scroll bar (which part of metl).
i have "metid" everywhere else in div set resume dragging div around.
the pause , resume not work.
any resolving issue helpful, thank you.
it quite difficult answer question, without seeing html markup comprising structure of relevant elements. there may better approach trying accomplish. nevertheless, i'm pointing out 1 possible issue:
the drag , drop action starts, when dojo registers dragstart
, mousedown
, or selectstart
events on drag handle. in case drag handle div id "divmenu"+threadid
. of these events triggered before click
event occurs, pausing moveblocker
has no effect.
in addition think, moveblocker event should not empty function. instead should actively 'block' relevant events being propagated drag handle:
var moveblocker = on.pausable(dnd.handle, "mousedown,dragstart,selectstart", function(e) { e.stoppropagation(); e.preventdefault(); });
depending on behavior trying accomplish, other event handlers should registered on "mousedown" event.
Comments
Post a Comment