🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Oct 9, 2020

Summary

In Chrome, if an element having a focusout handler is blurred by
clicking outside of it, it invokes the handler synchronously. If
that handler calls .remove() on the element, the data is cleared,
leaving private data undefined. We're reading a property from that
data so we need to guard against this.

Fixes gh-4417

Checklist

In Chrome, if an element having a focusout handler is blurred by
clicking outside of it, it invokes the handler synchronously. If
that handler calls `.remove()` on the element, the data is cleared,
leaving private data undefined. We're reading a property from that
data so we need to guard against this.

Fixes jquerygh-4417
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Oct 19, 2020
@mgol mgol removed Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. Needs review labels Oct 19, 2020
@mgol mgol merged commit 5c2d087 into jquery:master Oct 19, 2020
@mgol mgol deleted the blur-removal-crash branch October 19, 2020 19:17
mgol added a commit that referenced this pull request Oct 19, 2020
In Chrome, if an element having a `focusout` handler is blurred by
clicking outside of it, it invokes the handler synchronously. If
that handler calls `.remove()` on the element, the data is cleared,
leaving private data undefined. We're reading a property from that
data so we need to guard against this.

Fixes gh-4417
Closes gh-4799

(cherry picked from commit 5c2d087)
@mgol
Copy link
Member Author

mgol commented Oct 19, 2020

Landed in 5c2d087 on master & in aaf9c55 on 3.x-stable.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

Exception when element is removed on blur

4 participants