Opened 14 years ago
Closed 13 years ago
#6382 closed bug (fixed)
.live() not working properly with "has attribute" css selector
Reported by: | cjoudrey | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.4.3 |
Component: | selector | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
There appears to be a problem with .live() and "has attribute" css selector when using forms.
Using the following HTML:
<span title="test">1234</span> <form> <input type="text" name="title" /> </form>
When you run $('[title]'), the span element is returned.
However, if you use the following:
$('[title]').live('click', function() { alert('clicked a [title]'); });
When you click on the input an alert occurs. The selector [title] returns the <form>.
Reproduced in Firefox 3.6.
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 13 years ago by
Priority: | → undecided |
---|---|
Status: | new → open |
comment:3 Changed 13 years ago by
I think I'm understanding the question correctly, but was not able to replicate the problem here: http://jsfiddle.net/dBsr4/
Clicking on the second input does not return the 'item clicked' alert.
comment:4 Changed 13 years ago by
I am also unable to replicate the problem now. Maybe it got fixed. The issue can be closed.
comment:5 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Milestone: | → 1.4.3 |
Priority: | undecided → low |
Resolution: | → fixed |
Status: | open → closed |
Closing as requested by the reporter. Fixed in 1.4.3
This is actually due to the fact that the names of input elements become properties of the form that contains them.
http://yura.thinkweb2.com/domlint/