Opened 11 years ago

Closed 4 years ago

#5795 closed defect (patchwelcome)

[Patch] [CLA] Prevent Moveable widgets from moving out of reach

Reported by: guest Owned by: Eugene Lazutkin
Priority: blocker Milestone: 1.13
Component: DnD Version: 1.0
Keywords: DnD Moveable Mover Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

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

Attachments (1)

Mover_Moveable.patch (5.5 KB) - added by guest 11 years ago.
Fix for the ticket

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by guest

Attachment: Mover_Moveable.patch added

Fix for the ticket

comment:1 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.1
Status: newassigned

comment:2 Changed 11 years ago by bill

Milestone: 1.11.2

Move all milestone 1.1 tickets to 1.2, except for reopened tickets and tickets opened after 1.1RC1 was released.

comment:3 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.2future

Moving all open ticketd to the future.

comment:4 Changed 11 years ago by Eugene Lazutkin

Description: modified (diff)
Priority: normalhigh

comment:5 Changed 8 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:6 Changed 7 years ago by bill

I actually addressed the Dialog issue in #12238 but I suppose the problem still exists for other draggable objects.

comment:7 Changed 7 years ago by bill

Also, I fixed the auto-scroll problem in [29048].

comment:8 Changed 4 years ago by dylan

Summary: [Patch] [CLA] Prevent Moveable widgets from moving out of reach and make autoScroll behavior configurable.[Patch] [CLA] Prevent Moveable widgets from moving out of reach

Update ticket description to reflect that only half of the issue remains.

comment:9 Changed 4 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: assignedclosed

This would need an updated patch against master in order to land this. Closing as patchwelcome. I will review immediately if someone wants to create an updated fix for this.

Note: See TracTickets for help on using tickets.