Opened 10 years ago

Closed 10 years ago

Last modified 5 years ago

#11132 closed defect (fixed)

_HasDropDown causing erroneous _onBlur calls in IE

Reported by: Douglas Hays Owned by: bill
Priority: high Milestone: 1.5
Component: Dijit Version: 1.5.0b2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

There seem to be 2 different problems with _HasDropDown and _onBlur.
Run the attached testcase in IE and click the TooltipDialog? button.
Then click the Select that pops up inside the Dialog.
First problem: the tooltip dialog closes immediately as soon as the Select box is clicked (first time only). Problem happens when clicking the label of the Select box, not the arrow.
Second problem: on subsequent clicks of the Select box, the Select menu appears but selecting anything or cancelling causes the tooltip dialog to also close.
The same behavior can be observed if you substitute a DropDownButton? in place of the Select widget.
IBM ticket #144204

Attachments (2)

144204.html (1.3 KB) - added by Douglas Hays 10 years ago.
testcase
11132_2.patch (388 bytes) - added by Douglas Hays 10 years ago.
possible fix to 2nd problem

Download all attachments as: .zip

Change History (17)

Changed 10 years ago by Douglas Hays

Attachment: 144204.html added

testcase

Changed 10 years ago by Douglas Hays

Attachment: 11132_2.patch added

possible fix to 2nd problem

comment:1 Changed 10 years ago by bill

(In [22191]) When closing a drop down, refocus the parent widget before closing the drop down, rather than after. This avoids a momentary focus onto <body> which causes problems with nested drop downs, when they all close, rather than just the top one. Refs #11132 (mostly fixing it), thanks to Xiao Wen W Zhu/Doug? Hays for patch.

comment:2 Changed 10 years ago by bill

Description: modified (diff)

The IE problem relates to the mousedown handler in focus.js:

var mousedownListener = function(evt){
	dijit._justMouseDowned = true;
	setTimeout(function(){ dijit._justMouseDowned = false; }, 0);
	dijit._onTouchNode(effectiveNode || evt.target || evt.srcElement, "mouse");
};

When the Select box label is clicked the first time, evt.srcElement points to the <SPAN class="dijitReset dijitInline dijitSelectLabel"></SPAN>. (Not sure why there's no text in there....), but the real problem is that the evt.srcElement.parentNode is the document itself, rather than the Select.domNode.

Looks like a browser bug.

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

(In [22198]) Workaround strange problem where first time clicking a Select in a TooltipDialog (on any version of IE) causes the TooltipDialog to close. Fixes #11132 !strict.

comment:4 Changed 10 years ago by bill

(In [22219]) Clean up the TooltipDialog a11y tests, avoiding spurious IE error and using keystrokes (rather that API calls) to open and close TooltipDialog. Refs #11132.

comment:5 Changed 10 years ago by bill

(In [22220]) Add TooltipDialog mouse tests, particularly the test case for the bug in #11132, refs #11132 !strict.

comment:6 Changed 9 years ago by bill

(In [22232]) More cleanup to use keystrokes (rather that API calls) to open and close TooltipDialog. Refs #11132.

comment:7 Changed 9 years ago by bill

(In [22233]) Make tests work on safari:

  • remove alert() from test_TooltipDialog.html that was interfering with test (not sure why it wasn't interfering with all browsers).
  • workaround safari (webkit build 431.22) problem where tabbing from an InlineEditBox in edit mode goes to the InlineEditBox in display mode, rather than the next field. Bug doesn't occur in chrome/latest webkit, build 433, so not worth fixing in dojo. Refs #11132.

comment:8 Changed 9 years ago by bill

(In [22236]) Fix IE focus problems in the robot tests Toolbar.html and TooltipDialog.html.

Show/hide of popups was implemented via dynamic addition/deletion of DOM nodes to the document. Those dynamic additions/deletions caused the current node to lose focus, or when the user tabs to a new field it gets focus momentarily but then focus jumps to <body>.

Best solution I could come up with was to pre-create the popup wrapper <div> and then not recycle wrapper <div> or <iframe> (although a possible optimization would be to recycle the iframe).

Fixes #10404, #11193, refs #11132, #10016, #10167 !strict.

comment:9 Changed 9 years ago by bill

(In [22783]) Workaround IE's no-blur event problem (see [22198]) by closing non-ancestor popups whenever a new popup is opened. Refs #11132, #11647 (fixes the last test in Select.html on IE) !strict.

comment:10 Changed 7 years ago by bill

In [29090]:

fix numerous test case errors, refs #11132.

comment:11 Changed 5 years ago by Bill Keese <bill@…>

In 2ed43ef0a195d7dd7e3873797f5987e9f4d226b9/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:12 Changed 5 years ago by Bill Keese <bill@…>

In 25bfd796a4e298ef264895cff129d46437ec7425/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:13 Changed 5 years ago by Bill Keese <bill@…>

In fe39d0ddb9d6577cba173da83e069fdd15252449/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:14 Changed 5 years ago by Bill Keese <bill@…>

In 0f9c52d4deb2c191968bc7476483e1c70673899d/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:15 Changed 5 years ago by Bill Keese <bill@…>

In f5475f1f7ecfdcca138852efeecd3e0f06c4795b/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.