Opened 8 years ago

Closed 8 years ago

#13805 closed defect (fixed)

Widgets inheriting from TextBox cause IE error when destroyed immediately after instantiation

Reported by: sgourley Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.5
Keywords: ie textbox error Cc:
Blocked By: Blocking:

Description

https://github.com/dojo/dijit/blob/master/form/TextBox.js#L122

causes a nodeType is null or not an object when destroying the widget quickly. I noticed this behavior in a jasmine test in ie.

http://jsfiddle.net/icsteveoh/mbMb5/

there shouldnt be functions that rely on objects that may not exist.

This affects everything that inherits from textbox - filteringselect etc.

A quick fix is adding if (this._beingDestroyed) { return; } to the setTimeout.

But should the setTimeout be refactored to some other means?

Change History (3)

comment:1 Changed 8 years ago by Douglas Hays

Component: GeneralDijit - Form
Owner: set to Douglas Hays
Summary: Anything inheriting from TextBox.js causes ie error when destroyingWidgets inheriting from TextBox cause IE error when destroyed immediately after instantiation

comment:2 Changed 8 years ago by Douglas Hays

Milestone: tbd1.7
Status: newassigned
Version: 1.7.0b11.5

It's an edge case that started in 1.5 but easy to workaround by just expanding the try/catch that's already there.

comment:3 Changed 8 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [26432]:

Fixes #13805. Expand existing try/catch to encompass the getComputedStyle call.

Note: See TracTickets for help on using tickets.