Opened 10 years ago

Closed 10 years ago

#14346 closed defect (fixed)

dijit.form.TextBox with name=length cannot be created under IE

Reported by: Alexander Kläser Owned by: bill
Priority: high Milestone: 1.8
Component: Dijit Version: 1.6.1
Keywords: Internet explorer, IE, IE8, input, name, length Cc:
Blocked By: Blocking:

Description (last modified by bill)

If a TextBox element is create programmatically with IE8, an error is thrown as the TextBox' focusNode property is not set. This is related to IE's behavior that the name "length" will override the original length field of its parent. Hence dijit._Templated._attachTemplateNodes() will fail. The attached patch fixes this problem.

See also:

Attachments (1)

fix_dijit_Templated.patch (595 bytes) - added by Alexander Kläser 10 years ago.
fix for dijit._Templated

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Alexander Kläser

Attachment: fix_dijit_Templated.patch added

fix for dijit._Templated

comment:1 in reply to:  description Changed 10 years ago by Alexander Kläser

Replying to alexklaeser:

If a TextBox? element is create programmatically with IE8, ...

new dijit.form.TextBox({name:"length"});

Last edited 10 years ago by bill (previous) (diff)

comment:2 Changed 10 years ago by bill

Description: modified (diff)
Milestone: 1.8
Owner: set to bill
Status: newassigned

Wow, that's a weird one. I do reproduce that exception, even on IE8, it gives a "'tagName' is null or not an object" error. I'll check in your suggested fix.

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

In [27260]:

Don't access nodes.length since it can be corrupt on IE, fixes #14346 !strict, thanks alexklaeser.

Note: See TracTickets for help on using tickets.