Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#7037 closed defect (fixed)

dojo.query fails in IE7

Reported by: haysmark Owned by: alex
Priority: high Milestone: 1.2
Component: Query Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

In dijit/tests/form/test_Slider.html, in an addOnLoad, add this statement:

console.log(dojo.query("div[style*='20%']", dojo.byId('dijit_form_HorizontalRule_0'))[0]);

This returns the first 20% ruler marker (the vertical line below the 20%) in FF2 and Safari, but returns undefined in IE7.

When I open up the particular ruler marker in the IE developer toolbar, it says the style attribute has a value of LEFT: 20%, which contains 20% and should match my *= query.

I was using this in the context of automated testing, to drag the slider to the 20% marker without resorting to firstChild.nextSibling.

Change History (4)

comment:1 Changed 11 years ago by bill

Owner: changed from anonymous to alex

comment:2 Changed 11 years ago by alex

querying the style attribute for a value probably isn't the right way to handle this. That said, I do agree that a string match on an item's style property should probably be handled against the cssText value, although this is *also* non-portable as Opera doesn't support it

comment:3 Changed 11 years ago by alex

Resolution: fixed
Status: newclosed

(In [14411]) ensuring that we search cssText instead of the style property directly when doing string matches on attribute values. Fixes #7037. Tested on IE, FF, Safari, and Opera 9.5. !strict

comment:4 Changed 10 years ago by bill

Component: CoreQuery
Note: See TracTickets for help on using tickets.