Opened 12 years ago

Closed 12 years ago

#4439 closed defect (fixed)

Move IE quirk behavior from _Widget to parser

Reported by: Adam Peller Owned by: Adam Peller
Priority: high Milestone: 1.0
Component: Parser Version: 0.9
Keywords: attributemap Cc:
Blocked By: Blocking:

Description

As per Bill's request

Anyway, all of the issues seem to revolve around style and class so let me address that first. For style and class I'd like the user to be able to do

new dijit.form.Button( {

style: "x: 100px, y: 100px", "class": "foo bar"

});

So this code you have in Widget.js:

Deal with IE quirks for 'class' and 'style' switch(attr){ case "class":

domValue = node.className; break;

case "style":

if(domValue && dojo.isObject(domValue)){

domValue = domValue.cssText; IE

}

}

should be in parser.js around line 138, to create a variable called value, rather than just accessing item.value.

var item = attributes.getNamedItem(name); var value = item.value; Deal with IE quirks for 'class' and 'style' switch(name){ case "class":

value = node.className; break;

case "style":

value = node.cssText; IE break;

}

It also means that this comment should change:

genericMap Object: A map of attributes -- typically standard HTML attributes -- to

transfer

from the parsed node into the new dom, at the widget's domNode, by

default.

Other node references can be specified as properties of 'this'

There may be no parsed node. genericMap is just a map of attributes to set on the widget's DOM tree.

I don't want to make another branch just to manage this (impacts dojo), so we'll do it after the merge. See #3058

Change History (1)

comment:1 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

In [10530]

Note: See TracTickets for help on using tickets.