Opened 9 years ago

Closed 9 years ago

#11094 closed defect (fixed)

DropDownButton don't remain open within a Portlet/GridContainer combination

Reported by: Marcus Reimann Owned by: Shane O'Sullivan
Priority: high Milestone: 1.6
Component: DojoX Widgets Version: 1.5.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Creating a GridContainer, adding a Portlet and then a DropDownButton with a TooltipDialog causes some problems: If you click on the DropDownButton, the ToolTipDialog will show up and then closes immediately.

It looks like the click on the DropDownButton is also sent to the portlet or something like that.

Attached you will find a test case which you can copy within the trunk/dojox/layout/tests/ directory, in order to see the described behaviour of the DropDownButton.

Regards,

Marcus

Attachments (4)

test_GridContainer_Portlets_DropDownButtons_TooltipDialog_Marcus.html (3.0 KB) - added by Marcus Reimann 9 years ago.
test_GridContainer_Portlets_DropDownButtons_TooltipDialog_Marcus2.html (3.1 KB) - added by Marcus Reimann 9 years ago.
second test case (declarative)
patch_dojoxMoveable.txt (1.9 KB) - added by jfcunat 9 years ago.
patch_dojoxMoveable2.txt (870 bytes) - added by jfcunat 9 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 9 years ago by Marcus Reimann

The following attachment shows the same test case, but with a declarative created GridContainer?.

In this case, everything works fine. The parameters for the GridContainer? are the same like in the first test case. So, the only difference is, that the GridContainer? is created with the help of Dojo's parser in the second test case.

Perhaps something is wrong on my side with creating the GridContainer? programmatically as I've done in the first test case?

Changed 9 years ago by Marcus Reimann

second test case (declarative)

comment:2 Changed 9 years ago by bill

Owner: changed from dante to Shane O'Sullivan

comment:3 Changed 9 years ago by bill

Description: modified (diff)

My guess is that the DropDownButton (which extends _HasDropDown) isn't [any longer] catching the onclick event, and that event is causing the portlet itself to get focus.

_HasDropDown connects to onmousedown/onmouseup.

comment:4 Changed 9 years ago by Shane O'Sullivan

Status: newassigned

Adding a dragHandleClass attribute to the programmatic GridContainer? fixes this issue, e.g.

var gridContainer=new dojox.layout.GridContainer?({

nbZones:3, opacity:.5, hasResizableColumns:false, allowAutoScroll:false, dragHandleClass: 'dijitTitlePaneTitle', withHandles:true, style: {width:'1000px'}, acceptTypes:Portlet?, isOffset:true

}, 'placeHere');

comment:5 in reply to:  4 Changed 9 years ago by Marcus Reimann

This is great! It works like a charm.

Now, I will add this example to http://docs.dojocampus.org/dojox/layout/GridContainer for other users.

Thank you very much, Shane!

Marcus

PS: My thanks goes also to Bill, of course.

comment:6 Changed 9 years ago by Shane O'Sullivan

Resolution: fixed
Status: assignedclosed

comment:7 Changed 9 years ago by bill

Hmm OK, well this started in [22001] so maybe I should also add a dojo.stopEvent() call (onclick) into _HasDropDown.

I'm also wondering if there's still an issue on FF when the portlet has a scrollbar, because (IIRC) FF will focus anything with a scrollbar.

Changed 9 years ago by jfcunat

Attachment: patch_dojoxMoveable.txt added

comment:8 Changed 9 years ago by jfcunat

Resolution: fixed
Status: closedreopened

comment:9 Changed 9 years ago by jfcunat

This a patch to separate onMouseUp into a _releaseCapture function that we still have to do to stop capturing move if there is no 3px move from the current position and the other part responsible to stop a drag. This seems to solve the problem without workaround and is safer for other cases I think. What is your opininon ?

comment:10 Changed 9 years ago by jfcunat

New patch for more simple resolution following Bill suggestion

Changed 9 years ago by jfcunat

Attachment: patch_dojoxMoveable2.txt added

comment:11 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:12 Changed 9 years ago by Shane O'Sullivan

(In [22755]) Refs #11094 Fixes the issue where a dropdown button with a tooltip dialog will not stay open if contained within a Portlet

comment:13 Changed 9 years ago by Shane O'Sullivan

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.