Ticket #7797 (closed defect: fixed)

Opened 3 months ago

Last modified 7 weeks ago

IE: with _onDayClick in dijit._Calendar

Reported by: datasage Owned by: peller
Priority: normal Milestone: 1.3
Component: Dijit Version: 1.2beta
Severity: normal Keywords:
Cc:

Description (last modified by bill) (diff)

While trying to track down a diffrent IE6 error with the DateTimeTextBox, I found an issue with the event handling for the onDayClick function.

In IE6, if you click on a day, hold down the mouse button and drag the mouse to another day before releasing the button, an error will be generated in this function:

_onDayClick: function(/*Event*/evt){
			var node = evt.target;
			dojo.stopEvent(evt);
			while(!node.dijitDateValue){
				node = node.parentNode;
			}
			if(!dojo.hasClass(node, "dijitCalendarDisabledDate")){
				this.attr('value', node.dijitDateValue);
				this.onValueSelected(this.value);
			}
		},

Essentially, with that action, the event object does not have a target member.

Steps to reproduce:

  1. In IE6 go to the test page: http://download.dojotoolkit.org/current-dev/dojo-release-1.2.0/dijit/tests/form/test_DateTextBox.html
  2. Click on any DateTimeTextBox to open the calendar.
  3. Click on a day, and hold down the mouse button.
  4. Move the mouse to another day, and release.
  5. You will see an error message.

I tested in IE6 and FF3. Only IE6 would produce the error.

Change History

Changed 2 months ago by bill

  • owner set to peller
  • description modified (diff)

Adam, can you handle?

The obvious solution would be to setup a separate handler on each day node. Might be a performance hit though.

Alternately, maybe there's another property in the event object we can use, like evt.relatedTarget.

Or, could just ignore the event in the case that evt.target is null.

Changed 7 weeks ago by peller

  • status changed from new to closed
  • summary changed from IE6 Error with _onDayClick in dijit._Calendar to IE: with _onDayClick in dijit._Calendar
  • resolution set to fixed
  • milestone changed from tbd to 1.3

Fixed in [15790] and [15792]

Note: See TracTickets for help on using tickets.