Bug Tracker

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#14584 closed bug (fixed)

Attribute Ends With case-insensitive in some IE8

Reported by: yohanngelisse@… Owned by: gibson042
Priority: low Milestone: 1.11/2.1
Component: selector Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

Attribute Ends With Selector [name$="value"] is case-insensitive in some IE8 (Tested with IE8 v.8.0.6001.18702 on Windows Vista).

You can reproduce with this jsFiddle http://jsfiddle.net/jkDR8/. With my IE8, values for inputs "test1.value", "test2.value" and "testValue" are replaced with this script : jQuery("input[name$='value']").val("toto");

Only "test1.value" and "test2.value" should be replaced.

Change History (7)

comment:1 Changed 2 years ago by gibson042

  • Component changed from unfiled to selector
  • Owner set to gibson042
  • Priority changed from undecided to low
  • Status changed from new to assigned

Confirmed. Fortunately, this particular querySelectorAll flaw seems to only affect the name attribute: http://jsfiddle.net/jkDR8/1/

comment:2 Changed 2 years ago by timmywil

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

Duplicate of #12024.
Case sensitivity affects many attributes (and not all of them). This is related to an existing Sizzle issue, which we will probably not fix as it requires maintaining a long list of attributes.

I suppose we could provide a smaller fix for the 2.x branch, but I'd be cautious about targeting specific 2.x issues in Sizzle.

comment:3 Changed 2 years ago by gibson042

  • Resolution duplicate deleted
  • Status changed from closed to reopened

This is distinct from #12024 because the root cause is not Sizzle code but the IE8 querySelectorAll that incorrectly matches <input name="LOWER"/> against "[name=lower]".

comment:4 Changed 2 years ago by timmywil

It is not distinct because even if we were to fix the result for IE8 (and I'd be surprised if name was the only attribute affected here), other browsers would continue to be inconsistent when it comes to case sensitivity and attributes. We could fix the name attribute across browsers if we see that attribute as more important than other attributes, but it seems like polishing the brass on the titanic if we're not going to tackle all of them.

comment:5 Changed 2 years ago by timmywil

  • Status changed from reopened to assigned

Alright, well looking at it from the perspective of providing case-sensitivity for all attribute across browsers (which is useful but still technically wrong), I'm fine with fixing this.

comment:6 Changed 2 years ago by Richard Gibson

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

Selector: update Sizzle

Fix #14584

Changeset: 29c8003347e8768e26077c6d040203d662009220

comment:7 Changed 2 years ago by dmethvin

  • Milestone changed from None to 1.11/2.1
Note: See TracTickets for help on using tickets.