Opened 5 years ago

Last modified 2 years ago

#17802 new defect

popup fails to close when dragging Moveable

Reported by: Devang Negandhi Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.15
Component: DnD Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description

If I open a Select dropdown and then go click on the title of a floating pane, the dropdown does not close. This causes a problem when we have 2 floating panes. If I have the dropdown open in one floating pane and I move a second floating pane over it, the popup from the first floating pane now shows on top of the new floating pane

Take a look at the following jsfiddle: http://jsfiddle.net/K9zk6/1/

In the above jsfiddle,

  1. Open the select box on the floating pane titled "A floating pane 2"
  2. Now go and click on the title of "A floating pane 1"
  3. You can see that the dropdown from the select of "A floating pane 2" show on top of "A floating pane 1"
  4. Even if you move the floating pane 1 around, the dropdown is still visible

I am also attaching a screenshot of the issue along with this ticket

Attachments (2)

FloatingPaneBug.png (8.1 KB) - added by Devang Negandhi 5 years ago.
fp.html (2.3 KB) - added by bill 5 years ago.
copy of test, to run locally

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by Devang Negandhi

Attachment: FloatingPaneBug.png added

comment:1 Changed 5 years ago by bill

Component: GeneralDojoX Layout
Summary: dijit.form.Select popup fails to closedijit.form.Select popup fails to close when clicking title of FloatingPane

Notice that clicking other parts of the screen closes the dropdown... so it's probably FloatingPane? (unnecessarily) calling evt.preventDefault() (or indirectly calling it via dojo.stopEvent() etc.), preventing dijit's focus manager from seeing the mousedown event.

PS: or possibly the evt.preventDefault() problem is in dojo/dnd/Moveable?

Last edited 5 years ago by bill (previous) (diff)

comment:2 Changed 5 years ago by bill

Component: DojoX LayoutDnD
Owner: set to Eugene Lazutkin
Summary: dijit.form.Select popup fails to close when clicking title of FloatingPanepopup fails to close when dragging Moveable

OK, the evt.stopPropagation() is from dojo/dnd/Moveable.js, in the onMouseDown() method. There are a number of tickets against the DnD code to stop calling evt.stopPropagation(): #16157, #17606, #17110... and now this one.

Last edited 5 years ago by bill (previous) (diff)

Changed 5 years ago by bill

Attachment: fp.html added

copy of test, to run locally

comment:3 Changed 5 years ago by Eugene Lazutkin

My understanding is that the extensive analysis was done, and removing a call to stopPropagation() cures all related problems. Is it correct? If so, let's remove it, and close all those tickets.

comment:4 Changed 5 years ago by bill

No, it's not exhaustively tested... actually removing the stopPropagation() call breaks the nested moveable in test_moveable.html. I.e. moving the nested yellow div drags its parent div along with it.

I'm not sure what the right solution to this problem is. When we drop support for older browsers, the dijit popup code can listen for mousedown in the capturing phase rather than the bubbling phase, making it immune to stopPropagation() calls. But can't do that for Dojo V1.

comment:5 Changed 3 years ago by dylan

Milestone: tbd1.12

Revisit for 1.12, but probably need to close as it looks like we cannot fix until 2.0.

comment:6 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.