Opened 5 years ago

Closed 4 years ago

#14346 closed defect (fixed)

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

Reported by: alexklaeser 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 alexklaeser 5 years ago.
fix for dijit._Templated

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by alexklaeser

fix for dijit._Templated

comment:1 in reply to: ↑ description Changed 5 years ago by alexklaeser

Replying to alexklaeser:

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

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

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

comment:2 Changed 5 years ago by bill

  • Description modified (diff)
  • Milestone set to 1.8
  • Owner set to bill
  • Status changed from new to assigned

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 4 years ago by bill

  • Resolution set to fixed
  • Status changed from assigned to closed

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.