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

It is unclear how isInputPending should work if focus is moved to another iframe when there is a pending key event #44

Open
smaug---- opened this issue Aug 2, 2021 · 2 comments

Comments

@smaug----
Copy link

Some spec should define the order of focus and key events and how it all works with isInputPending

@smaug---- smaug---- changed the title It is unclear how isInputPending should work if focus is moved to another iframe when there is a pending key eventt It is unclear how isInputPending should work if focus is moved to another iframe when there is a pending key event Oct 21, 2021
@npm1
Copy link
Contributor

npm1 commented Oct 28, 2021

@acomminos this is blocking Mozilla's implementation, could you take a look?

@acomminos
Copy link
Contributor

The spec outlines the solution space for this case briefly:

The case of a child cross-origin subframe is even trickier to deal with, as the frame that gets an event may change based on what script is currently doing. In some cases a malicious cross origin frame could attempt to bring focus to itself in order to look for input events that a user could have intended to be sent to the parent frame. For example, a malicious origin could attempt to get a user to click on a child iframe by moving it around the screen. Some user agents mitigate this by discarding input events on recently moved frames. User agents should pay special attention to this case, and add appropriate countermeasures to their implementations of this api based on their architecture.

Normative steps on determining the origin responsible for a given event are likely outside of the scope of the API. Given these cases orient around cross-origin iframes, perhaps HTML may be a good place for this?

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

No branches or pull requests

3 participants