Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Event: Use only one focusin/out handler per matching window & document#4656

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mgol merged 1 commit intojquery:3.x-stablefrommgol:3.x-focusin-window-document
Apr 6, 2020

Conversation

@mgol
Copy link
Member

@mgolmgol commentedApr 6, 2020

Summary

Thedoc variable in:
https://github.com/jquery/jquery/blob/3.4.1/src/event/focusin.js#L30
matcheddocument fordocument &window forwindow, creating two separate
wrapper event handlers & calling handlers twice if at least onefocusout or
focusin handler was attached onbothwindow &document, or onwindow
& another regular node.

Also, fix the "focusin from an iframe" test to actually verify the behavior
from commit1cecf64 - the commit that
introduced the regression - to make sure we don't regress on either front.

+5 bytes.

Test updates should be cherry-picked tomaster without any source changes.

Checklist

Krinkle reacted with thumbs up emoji
@mgolmgol added Bug Event Needs review Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labelsApr 6, 2020
@mgolmgol added this to the3.5.0 milestoneApr 6, 2020
@mgolmgol self-assigned thisApr 6, 2020
@mgolmgolforce-pushed the3.x-focusin-window-document branch 2 times, most recently from0a19d1a to2e48489CompareApril 6, 2020 16:26

// DOM focus is unreliable in TestSwarm
if(QUnit.isSwarm&&!focus){
assert.ok(true,"GAP: Could not observe focus change");
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@gibson042 BTW, I copied this from other similar assertions but... what is GAP?

Copy link
Member

Choose a reason for hiding this comment

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

My attempt to make clear that this is not a true passing assertion, but rather a failure to verify the desired assertion at all... agap between intent and capability.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah. Since it’s all uppercase, I thought it’s an acronym. 😅

@mgolmgolforce-pushed the3.x-focusin-window-document branch from2e48489 to6f78bbaCompareApril 6, 2020 16:46
@timmywiltimmywil removed the Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labelApr 6, 2020
… documentThe `doc` variable in:https://github.com/jquery/jquery/blob/3.4.1/src/event/focusin.js#L30matched `document` for `document` & `window` for `window`, creating two separatewrapper event handlers & calling handlers twice if at least one `focusout` or`focusin` handler was attached on *both* `window` & `document`, or on `window`& another regular node.Also, fix the "focusin from an iframe" test to actually verify the behaviorfrom commit1cecf64 - the commit thatintroduced the regression - to make sure we don't regress on either front.
@mgolmgolforce-pushed the3.x-focusin-window-document branch from6f78bba toa236ecaCompareApril 6, 2020 17:57
@mgolmgol changed the titleEvent: attach only one focusin/focusout handler per matching window & documentEvent: Use only one focusin/out handler per matching window & documentApr 6, 2020
@mgolmgol merged commit9e15d6b intojquery:3.x-stableApr 6, 2020
@mgolmgol deleted the 3.x-focusin-window-document branchApril 6, 2020 18:34
mgol added a commit to mgol/jquery that referenced this pull requestApr 6, 2020
Backport tests from a jQuery 3.x fix that's not needed on `master`.Also, fix the "focusin from an iframe" test to actually verify the behaviorfrom commit1cecf64 - the commit thatintroduced the regression - to make sure we don't regress on either front.The main part of the modified test was checking that focusin handling in aniframe works and that's still checked. The test was also checking that itdoesn't propagate to the parent document, though, and, apparently, in IE itdoes. This one test is now blacklisted in IE.(cherry picked from9e15d6b)(cherry picked from1a4f10d)Refjquerygh-4652Refjquerygh-4656
@mgol
Copy link
MemberAuthor

mgol commentedApr 6, 2020

Tests backported tomaster in#4657.

mgol added a commit that referenced this pull requestApr 27, 2020
Backport tests from a jQuery 3.x fix that's not needed on `master`.Also, fix the "focusin from an iframe" test to actually verify the behaviorfrom commit1cecf64 - the commit thatintroduced the regression - to make sure we don't regress on either front.The main part of the modified test was checking that focusin handling in aniframe works and that's still checked. The test was also checking that itdoesn't propagate to the parent document, though, and, apparently, in IE itdoes. This one test is now blacklisted in IE.(cherry picked from9e15d6b)(cherry picked from1a4f10d)Refgh-4652Refgh-4656Closesgh-4657
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsOct 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@gibson042gibson042gibson042 left review comments

Assignees

@mgolmgol

Labels

Milestone

3.5.0

Development

Successfully merging this pull request may close these issues.

3 participants

@mgol@gibson042@timmywil

[8]ページ先頭

©2009-2025 Movatter.jp