Skip to content

Selector: Wrap activeElement access in try-catch #5229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 26, 2023

Summary

In IE 9 accessing document.activeElement may throw; see https://bugs.jquery.com/ticket/13393. We've already guarded against this in event code but not in selector.

Due to gzip magic, this is +0 bytes.

Checklist

In IE 9 accessing `document.activeElement` may throw; see
https://bugs.jquery.com/ticket/13393. We've already guarded
against this in event code but not in selector.
@mgol mgol added Selector Needs review Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Mar 26, 2023
@mgol mgol self-assigned this Mar 26, 2023
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 pending comment explaining the different document vs event

@mgol mgol merged commit 3936cf3 into jquery:3.x-stable Mar 27, 2023
@mgol mgol deleted the safe-active-element branch March 27, 2023 19:48
@mgol mgol added this to the 3.7.0 milestone Mar 27, 2023
@mgol mgol removed Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. Needs review labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants