Ticket #5795 (assigned defect)
[Patch] [CLA] Prevent Moveable widgets from moving out of reach and make autoScroll behavior configurable.
| Reported by: | guest | Owned by: | elazutkin |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | DnD | Version: | 1.0 |
| Severity: | normal | Keywords: | DnD Moveable Mover |
| Cc: |
Description
1)The current implementation of Mover in FF and Safari, allows to drag a a Moveable DOM out of reach (for example you can drag drag a Floating pane far in e.pageX or e.pageY negatives and once you drop it you can't get it back). This patch makes the behavior consistent with IE behavior: once the mouse is north or west of the page, the moving stops.
2)Also, the current default behavior of Mover is to autoScroll. In this patch I change the constructor to take an optional third param (boolean: autoScroll?, defaults to true for backward compatibility). If autoScroll is set to false, when your mouse reaches the end of the viewport it stops moving the Moveable DOM. This is a nice option for apps that simulate a desktop (with html, body {width: 100%; height: 100%;}). I also change Moveable to check for an optional autoScroll entry in the params object.
The first change seems to me like an obvious bug fix. The second seems very useful. If this doesn't seem acceptable, I can submit another solution like to implement a NonScrollableMover? or something like that.
Finally, I changed test_params.html to provide a test of the functionality.
My email for any questions issues: angel dot municio at nexaweb dot com