8000 feat: add focus and blur events for WebContents by samuelmaddock · Pull Request #25873 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add focus and blur events for WebContents #25873

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 1 commit into from
Feb 1, 2022

Conversation

samuelmaddock
Copy link
Member
@samuelmaddock samuelmaddock commented Oct 10, 2020

Description of Change

Adds 'focus' and 'blur' events to WebContents.

resolves #22201

cc @electron/wg-api

Checklist

Release Notes

Notes: Added 'focus' and 'blur' events to WebContents

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Oct 10, 2020
samuelmaddock added a commit to samuelmaddock/electron-browser-shell that referenced this pull request Oct 10, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Oct 11, 2020
@samuelmaddock
Copy link
Member Author

@electron/wg-releases requesting to add 11-x-y backport label 🙇

Copy link
Contributor
@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

Let's have a test :)

@jkleinsc
Copy link
Member

The API WG approved this at our Oct 19 2020 meeting.

@samuelmaddock
Copy link
Member Author

@nornagon Tests added

@nornagon
Copy link
Contributor

Just to clarify, does this event also trigger when the browserwindow is focused (e.g. through alt+tab)? or only when focus stays in the browser window and switches between webcontentses?

@samuelmaddock
Copy link
Member Author

Just to clarify, does this event also trigger when the browserwindow is focused (e.g. through alt+tab)? or only when focus stays in the browser window and switches between webcontentses?

It does trigger when focusing the BrowserWindow. I've added a test to confirm: 89ad21d

@nornagon
Copy link
Contributor

@samuelmaddock it looks like the new test is failing on macOS.

@jkleinsc
Copy link
Member

The releases WG approved this PR for backport to 11-x-y at the Oct 28, 2020 meeting

@jkleinsc
Copy link
Member
jkleinsc commented Nov 2, 2020

@samuelmaddock any updates on this? Looks like we are close to being able to merge this if the test failures can be resolved.

@samuelmaddock
Copy link
Member Author

@samuelmaddock any updates on this? Looks like we are close to being able to merge this if the test failures can be resolved.

No updates, I'll see if I can get around to this by the end of the week.

@lockieluke
Copy link

please get this merged asap

@jolindroth
Copy link
jolindroth commented Dec 28, 2021

Any updates?

@samuelmaddock @jkleinsc @nornagon

@nornagon nornagon added the semver/minor backwards-compatible functionality label Jan 28, 2022
@samuelmaddock samuelmaddock force-pushed the feat/webcontents-focus-events branch from 89ad21d to 8ceab22 Compare January 28, 2022 18:47
@samuelmaddock samuelmaddock requested review from a team as code owners January 28, 2022 18:47
@samuelmaddock samuelmaddock force-pushed the feat/webcontents-focus-events branch from 8ceab22 to 644c749 Compare January 28, 2022 18:50
test: add focus and blur WebContents event tests

test: confirm that webcontents focus event is fired on browserwindow focus

fix: mac focus event test timeout
@samuelmaddock samuelmaddock force-pushed the feat/webcontents-focus-events branch from 644c749 to d3a80e6 Compare January 29, 2022 21:09
@zcbenz zcbenz removed the wip ⚒ label Feb 1, 2022
@zcbenz zcbenz merged commit aeee9cf into electron:main Feb 1, 2022
@release-clerk
Copy link
release-clerk bot commented Feb 1, 2022

Release Notes Persisted

Added 'focus' and 'blur' events to WebContents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'focus' & 'blur' events to BrowserView/WebContents
7 participants
0