Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12238 closed defect (fixed)

Dialog: can be dragged off screen

Reported by: Adam Peller Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.0b1
Keywords: Cc: berkland@…
Blocked By: Blocking:

Description

open test_Dialog.html click on "Show Dialog" grab the title bar and drag upward as far as you can the dialog goes partially off screen, but the titlebar is no longer exposed, so you cannot move it back

Depending on the state of the application, this may be catastrophic if you can't dismiss the dialog

Attachments (2)

Dialog.diff (2.7 KB) - added by PEM 9 years ago.
patch
Dialog.js (18.8 KB) - added by PEM 9 years ago.
full version of the Dialog with fix included

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by PEM

Attachment: Dialog.diff added

patch

Changed 9 years ago by PEM

Attachment: Dialog.js added

full version of the Dialog with fix included

comment:1 Changed 9 years ago by PEM

This patch has been made in order to be able to keep the behaviour of pushing the dialog "out" of the viewport, to see what's behind. It replaces the dialog within the viewport's boundaries onMoveStop (on drop), so that you do not lose control of the dialog. The reposition occurs only onDrop so that if one wishes to start and show the dialog out of the viewport and place it IN the viewport with an animation, it is still possible.

comment:2 in reply to:  1 Changed 9 years ago by PEM

a test can be found here : http://dojo-sandbox.net/public/427eb/4

comment:3 Changed 9 years ago by bill

Milestone: tbd1.7
Owner: set to bill
Status: newassigned
Summary: Dialog can be moved off screenDialog: can be dragged off screen

comment:4 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [25306]) If dialog is dragged off screen, move it back into the viewport on mouse up, so that user doesn't lose access to it. Patch from Pierre-Emmanuel Manteau (DoYouSoft?, CCLA), thanks!

I modified the code to connect to Moveable's onMoveStart/onMoveEnd, rather than subscribing to dnd/start / dnd/end, to avoid getting spurious notifications that something else was dragged.

It's unclear if the if() condition in _position() to do nothing during a drag is necessary or not, I'm not sure if _position() is called during a drag.

Fixes #12238 !strict.

comment:5 Changed 9 years ago by bill

(In [25310]) simplify code, refs #12238 !strict.

Note: See TracTickets for help on using tickets.