Skip to content
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

Add onFocusChanged API #126

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Conversation

sergeichestakov
Copy link
Contributor

@sergeichestakov sergeichestakov commented Sep 7, 2023

Why

I think we should expose the native focus/blur events to the web client. While you can get around by setting a listener to the corresponding events in the DOM's document window, this feels more technically correct as there is no guarantee that there is a 1:1 correspondence between the two events. Additionally, this is more resilient to edge cases that may arise around iframes and such.

See Slack thread. Fixes WS-996.

What changed

Add onFocusChanged API

Test plan

Will test in follow up corresponding web branch / PR here: https://github.com/replit/repl-it-web/pull/36047

@linear
Copy link

linear bot commented Sep 7, 2023

Base automatically changed from @sergeichestakov/focus-fullscreen-api to main September 7, 2023 13:47
@sergeichestakov sergeichestakov merged commit 53923f9 into main Sep 7, 2023
4 checks passed
@sergeichestakov sergeichestakov deleted the @sergeichestakov/add-focus-api branch September 7, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants