Ticket #2936 (closed bug: fixed)
Handler.Drag: Does not move until the cursor, and does not finish properly.
| Reported by: | jorix | Owned by: | erilem |
|---|---|---|---|
| Priority: | blocker | Milestone: | 2.11 Release |
| Component: | Handler.Drag | Version: | 2.10 |
| Keywords: | Cc: | courriel@… | |
| State: | Commit |
Description
Using DragPan control, sometimes when the map is moved does not move to the place expected. This happens when we move fast and stop without releasing the mouse. Is easier to observe with large maps and slow browsers (e.g. IE) . This happens when property "interval" of Drag handler is greater that 0, to increase the performance.
I saw the Handler.Drag ends in four ways (up, out, deactivate & simultaneous right click) but not in all cases does the same. Why? No reason, It is necessary to do the same in all four cases, otherwise unexpected behavior occurs (shows the cursor "move" after finishing with a right click; or can not select text using IE after right click or deactivate() because document.onselectstart = OpenLayers.Function.False)
So the patch of this ticket proposes:
- When the mouse is moved without releasing it produces a "move" deferred.
- Use the same cancellation of "drag" on ending drag (in all four cases).
The patch includes a detailed test.
This also fixes ticket: #1101 and #2734 (patch proposed in #2734 is incomplete, fails the test)
NOTE: With "documentDrag = true" can also occur behavioral problems. But his study is beyond the scope of this ticket.

