I'm writing a tracing program in JS to drawline from where the mouse is pressed, held while its moved and then released. The onmouseup function is NOT called when the mouse is moved away from the location where it was pressed. It is called if the up is at the same location as the down. A workaround I've found is for the mousemove function to exit when a key (control or alt) is pressed as that is recorded in the event property.
Is there a way for mouseup to be recognized when the mouse has moved from the down location?
The tracing is over the top of a large image of a map. The purpose of the program is to measure distances on the map for various trips.
I was also having a problem with the design. Holding the mouse down while moving it was being interpreted as a drag. I changed the design to use a mousedown to start, mousemove to trace and another mousedown to end the trace. It's now working.