Opened 9 years ago
Closed 9 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 9 years ago by
Component: | General → Dijit - Form |
---|---|
Owner: | set to Douglas Hays |
Summary: | Anything inheriting from TextBox.js causes ie error when destroying → Widgets inheriting from TextBox cause IE error when destroyed immediately after instantiation |
comment:2 Changed 9 years ago by
Milestone: | tbd → 1.7 |
---|---|
Status: | new → assigned |
Version: | 1.7.0b1 → 1.5 |
Note: See
TracTickets for help on using
tickets.
It's an edge case that started in 1.5 but easy to workaround by just expanding the try/catch that's already there.