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 blur event handling and asynchronous checks to focus fixup rule tests #29258

Closed
lpd-au opened this issue Jun 7, 2021 · 1 comment
Closed

Comments

@lpd-au
Copy link

lpd-au commented Jun 7, 2021

The current focus fixup rule tests seemingly make no attempt to check:

  1. If the focus was not changed synchronously, whether the focus was shortly after changed asynchronously
  2. If the focus was changed at all, whether a blur event was or was not fired

Focus changes asynchronously

In the past, Chrome would have passed this test asynchronously but failed it synchronously, see crbug.com/660999. Additionally, other implementers have indicated that the timing of focus changes is not straightforward, see w3c/uievents#236 (comment). Therefore, in my opinion, it seems appropriate to test whether a failed synchronous test could still pass asynchronously. I believe this could be worked on immediately.

Event firing

In my opinion, the spec is at best ambiguous whether or not a blur event should be fired, and current browsers have diverging behaviour. To clarify this, I filed whatwg/html#6729. Once this is resolved, I believe we should add tests that verify the accepted behaviour, be that blur firing, not firing or optionally firing.

@lpd-au
Copy link
Author

lpd-au commented Jun 7, 2024

Should be fixed by #38062

@lpd-au lpd-au closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants