Opened 6 years ago

Closed 6 years ago

#17267 closed defect (fixed)

dijit._WidgetBase fails in IE8 if widget's domNode is input with defined type attribute

Reported by: zuzusik Owned by: bill
Priority: undecided Milestone: 1.10
Component: Dijit Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

HTML

<input type="text" data-dojo-type="dijit._WidgetBase" />

JS

require(["dojo/parser", "dojo/ready", "dijit/_WidgetBase"], function(parser, ready){
    ready(function () {
        parser.parse()
    });
});

The code above will fail in IE8 with error:

dojo/parser::parse() errorError: This command is not supported.

This happens in _attrToDom method of dijit._WidgetBase (dijit/_WidgetBase.js, line 732)

domAttr.set(mapNode, attrName, value);

when this code tries to set 'type' attribute with value 'text' to widget's domNode which already has this attribute.

NOTE: you need clean IE8 - in emulation mode with newer IE versions this bug is not reproducible.

Attachments (1)

inputType.html (497 bytes) - added by bill 6 years ago.
test case

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by bill

I know the problem you are talking about and I thought it was only in IE6 & IE7, but anyway that's why _FormWidget.js has the code:

// Override automatic assigning type --> focusNode, it causes exception on IE.
// Instead, type must be specified as ${type} in the template, as part of the original DOM
_setTypeAttr: null

I guess I could move that snippet from _FormWidget to _WidgetBase, although perhaps the workaround is enough for you? This won't be an issue in 2.0, in the sense that we aren't supporting IE8 anymore in 2.0. And also see #17213.

comment:2 Changed 6 years ago by bill

Milestone: tbd1.10
Owner: set to bill
Status: newassigned
Last edited 6 years ago by bill (previous) (diff)

Changed 6 years ago by bill

Attachment: inputType.html added

test case

comment:3 Changed 6 years ago by Bill Keese <bill@…>

Resolution: fixed
Status: assignedclosed

In b5632deabb11eb8995cb044d213c446257c0a56d/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.