Dealing with mouseup outside of window

26 views
Skip to first unread message

Abram Clark

unread,
Apr 23, 2014, 9:37:15 PM4/23/14
to threed...@googlegroups.com
This is a classic problem with most JavaScript drag code. Easy to fix here, kind of surprised it's not already. On line 197 of drag.js I now have:

if(!event.which) // drag ended outside window
drag.hijack( event, "dragend", dd );
else
drag.hijack( event, "drag", dd );

Is there some gotcha I'm not thinking about? Why doesn't it already work like this? I'd like to make a pull request, but can't find this project in a public source control. Why isn't drag.js on Github?
Reply all
Reply to author
Forward
0 new messages