Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#5312 closed defect (worksforme)

DateTextBox and TimeTextBox onChange firing twice

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.0.1
Component: Dijit - Form Version: 1.0
Keywords: TimeTextBox DateTextBox onchange Cc: daniel.monroe@…
Blocked By: Blocking:

Description

version 1.0.0 from AOL cdn
build 11363
Dan Monroe daniel.monroe@…

I've set an onChange function to a TimeTextBox? that is firing twice; once when the value is selected from the drop down and again when the focus is moved off the widget.

modified test_TimeTextBox.html :

<div class="testExample">
	<input id="q16b" type="text" name="time1b" class="medium" value="T17:45:00"
		dojoType="dijit.form.TimeTextBox"
		constraints="{timePattern:'h:mm:ss a'}"
		required="true"
		onChange="testing();"
		invalidMessage="Invalid time." />
</div>
function testing() {
console.debug( 'changed ' + (new Date().getTime()) );    
}

Steps to duplicate:

  • Pick new time from drop down. Value changes, Drop Down collapses. Focus is still in the text box.
  • Click off the text box with the mouse (or tab) and the onChange fires again (even though the value wasn't changed)

Console:
changed 1196812077968
changed 1196812080052

Change History (5)

comment:1 Changed 12 years ago by Adam Peller

Milestone: 1.1
Owner: set to Douglas Hays

comment:2 Changed 12 years ago by Douglas Hays

Milestone: 1.11.0.1
Resolution: fixed
Status: newclosed

I tried with the 1.0.1 and 1.1 trees and it seems to be only firing once so we'll call it fixed.

comment:3 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

comment:4 Changed 12 years ago by Adam Peller

Cc: daniel.monroe@… added
Resolution: worksforme
Status: reopenedclosed

comment:5 Changed 8 years ago by bill

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