Pending Map dragging, bug and possible solution

  • Thread starter DeletedUser53596
  • Start date

DeletedUser53596

Guest
sometimes after dragging the map, it will become stuck in "drag mode" even though the mouse button is no longer clicked. the issue seems to be caused by elements and/or their contents accidentally becoming highlighted/selected while you were dragging the map.

Code:
function clearSelection() {
    if ( document.selection ) {
        document.selection.empty();
    } else if ( window.getSelection ) {
        window.getSelection().removeAllRanges();
    }
}

calling this within the function that drags the map should help :)
 

DeletedUser53596

Guest
to recreate this bug, simply highlight stuff on purpose (starting highlighting from the quick menu and drag the mouse down), then attempt to drag the map, cursor turns "invalid" and you get a silhouette of the page similar to what you see when you attempt to drag a basic image.

the code above could therefore be used as a mouseup / touchend event
 
Top