Side navigation
#15104 closed bug (migrated)
Opened May 21, 2014 09:43AM UTC
Closed October 16, 2014 06:01PM UTC
.clone copies non-scalar properties, including the Sizzle cache
Reported by: | Jogi | Owned by: | gibson042 |
---|---|---|---|
Priority: | blocker | Milestone: | 1.12 |
Component: | manipulation | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Issue with space in selector with jquery 1.11.1 and Internet explorer.
exemple:
$(".testCls [name='blabla']")
cannot find anything when with older version, it work.
jsfiddle:
Attachments (0)
Change History (13)
Changed May 21, 2014 10:00AM UTC by comment:1
Changed May 21, 2014 11:33AM UTC by comment:2
owner: | → Jogi |
---|---|
status: | new → pending |
Your examples seem to be working correctly. Can you describe what you're trying to do, what behavior you're expecting, and what behavior you're seeing?
Changed May 26, 2014 12:43PM UTC by comment:4
status: | pending → new |
---|
0k So there is my case:
http://jsfiddle.net/xorkk/JTtu3/
I don't understand why on IE8:
$("#tblMF .numasaCmp_1 [name='NUMASA_CMP']") => undefined
but
$("#tblMF .numasaCmp_1").find("[name='NUMASA_CMP']") => works
On Firefox, both works.
Changed May 26, 2014 02:50PM UTC by comment:5
status: | new → pending |
---|
We'll need something more reduced than 1.4 KB of HTML plus a script unrelated to this issue.
Changed May 26, 2014 03:23PM UTC by comment:6
_comment0: | Ok i've reduce the exemple: \ \ http://jsfiddle.net/xorkk/JTtu3/ → 1401119617437666 |
---|---|
status: | pending → new |
Ok i've reduced the exemple:
Changed May 26, 2014 03:25PM UTC by comment:7
i See one more thing,
if i remove the line with .prop("disabled", false) , my selector works correclty.
Changed May 26, 2014 03:31PM UTC by comment:8
other observation:
$("#tblMF .numasaCmp_1 [name='NUMASA_CMP']") => undefined
but $("#tblAA .numasaCmp_1 [name='NUMASA_CMP']") => work
Changed May 26, 2014 06:12PM UTC by comment:9
owner: | Jogi → gibson042 |
---|---|
status: | new → assigned |
I removed superfluous markup and script from your fiddle and changed .val()
to .length
for better insight: http://jsfiddle.net/JTtu3/57/
There is something to this that seems to be related to Sizzle combinator caching in oldIE.
Changed June 24, 2014 03:23PM UTC by comment:10
_comment0: | Same problem with ":input" instead of [name...] \ \ $(".nonStructAssetTemplate :input").length == 0 \ $(".nonStructAssetTemplate").find(":input").length != 0 → 1403623672588349 |
---|
Same problem with ":input" instead of [name...]
$(".nonStructAssetTemplate :input").length == 0
$(".nonStructAssetTemplate").find(":input").length != 0
Changed July 25, 2014 01:53PM UTC by comment:11
This is actually a problem with .clone
: http://jsfiddle.net/JTtu3/59/
In IE8 (and other versions as well, I'm sure), the clone still has a reference to the Sizzle cache object of its referent, which wreaks all kinds of havoc with any operation using it. Maybe we can update fixCloneNodeIssues
to look for and remove attributes associated with reference-equal clone/source ''properties''.
Changed September 09, 2014 08:51PM UTC by comment:12
component: | selector → manipulation |
---|---|
milestone: | None → 1.12 |
summary: | Space in selector problem → .clone copies non-scalar properties, including the Sizzle cache |
Changed October 16, 2014 06:01PM UTC by comment:13
resolution: | → migrated |
---|---|
status: | assigned → closed |
Migrated to https://github.com/jquery/jquery/issues/1709
wrong jsfiddle
http://jsfiddle.net/kwfHZ/3/
i'm trying to reproduce my case correctly ...