Opened 9 years ago
Closed 9 years ago
#14264 closed bug (invalid)
Click event lost if element content changes mid-click
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If the content of an element changes between mouse mouse down and mouse up then the click event seem to not fire.
Repro here
Change History (5)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Owner: | set to anonymous |
---|---|
Status: | new → pending |
Does the problem also occur with bare DOM methods like addEventListener? If so the event just isn't happening. Please create a test case without jQuery and let us know.
comment:3 Changed 9 years ago by
The issue has more to do with $.html('new content') than with the event code. I've updated my repro (http://jsfiddle.net/apEbX/5/). Note how the problem happens with addEventListener as well but it goes away if I don't use jQuery to update the element's content.
comment:4 Changed 9 years ago by
A few more test cases to narrow it down. Note that the original case is passing a *number* to .html()
and not a string. Once it's a string the method goes through the .innerHTML
path and works as expected. However I haven't looked at why it would break, the bare DOM case should be similar to the .empty().append()
case.
comment:5 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
I submitted this. Sorry, forgot to login first.