[Dojo-checkins] [dojo] #5795: [Patch] [CLA] Prevent Moveable widgets from moving out of reach and make autoScroll behavior configurable.

dojo trac at dojotoolkit.org
Sat Sep 6 06:23:22 UTC 2008


#5795: [Patch] [CLA] Prevent Moveable widgets from moving out of reach and make
autoScroll behavior configurable.
--------------------------------+-------------------------------------------
 Reporter:  guest               |        Owner:  elazutkin
     Type:  defect              |       Status:  assigned 
 Priority:  high                |    Milestone:  future   
Component:  DnD                 |      Version:  1.0      
 Severity:  normal              |   Resolution:           
 Keywords:  DnD Moveable Mover  |  
--------------------------------+-------------------------------------------
Changes (by elazutkin):

  * priority:  normal => high


Old 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

New 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

--

-- 
Ticket URL: <http://trac.dojotoolkit.org/ticket/5795#comment:4>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list