Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#4160 closed defect (fixed)

DateTextBox: Calendar stuck open

Reported by: haysmark Owned by: bill
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

In FormWidgetsDemo?:

  1. Click inside the DateTextBox?. Calendar opens.
  2. Click on the DateTextBox? label, DOB.
  3. Click in the state selector.

The Calendar is stuck open after this.

Change History (5)

comment:1 Changed 12 years ago by haysmark

Owner: changed from haysmark to bill

I remove all of the calls to open in TimeTextBox?. Therefore, the DateTextBox? is incapable of opening a Calendar, right? So explain why I still get a Calendar, and furthermore, why I get *more than one* hitched call to _open from anonymous sources when I click in the input field.

Also, the TimeTextBox? _onBlur code that closes all of the popups does not fire when you blur from the DOB label in the test. Is this because the label is not a widget, so focus manager doesn't pick it up?

This is all very mysterious behavior.

comment:2 Changed 12 years ago by bill

Well, partly this is because clicking a label focuses on the associated input (try it in test_validate). Looks like the date text box closes momentarily (probably due to the mousedown event on the label, rather than a focus event?), but then focus is shifted back to the widget.

I'll ping you about the other stuff, because I'm not sure what you mean. TimeTextBox? calls dijit.popup.open() on line 84.

comment:3 Changed 12 years ago by haysmark

Bill, what I meant was I tried removing all calls to TimeTextBox?._open(). Therefore TimeTextBox? shouldn't be able to call dijit.popup.open() because there is no code path to _open(), right?

comment:4 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10198]) Fixes #4160: DateTextBox?: Calendar stuck open

Root cause of problem is that although clicking a label focuses on whatever it references, and causes a focus event (according to firebug), that event doesn't bubble up to document.body so dijit.focus doesn't know about it.

Check in leaves a smaller problem where clicking the label doesn't cause _onFocus() to be called, even though focus went to widget. Will deal with that after 0.9, probably by following a labels for attribute in the dijit.popup code.

comment:5 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.