-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Flushing of autofocus candidates should happen before updating the rendering of documents #4992
Comments
The flush was put after step 13 because it requires computed style to determine focusability, and we'd like to avoid additional style computation by the flush. If the flush is put before step 12, it triggers style computation for focusability check, and trigger style computation again for :focus style in step 13. I don't have a strong opinion on the current order. It's ok to move it before step 12. |
That sounds like more of an engine optimization issue. You don’t have to update layout or style in your engine at any given point since that’s really not supposed to be observable. What’s important is when things get painted to the screen because that’s observable. From that perspective, we need to update the autofocus before we update the painting / rendering of the page. |
How about moving the flush between 10 'run the animation frame callbacks' and 11 'run the update intersection observations steps' because the flush can change the scroll position? |
If the argument is that flushing could change the scroll position, then perhaps we need to be flushing it before scroll event get dispatched in step 6. It would be silly if we just fired scroll events, focused the element to scroll, then delayed scroll events until the next frame. |
That's reasonable. |
That sounds reasonable to me assuming that the scroll position for the newly focused element is computed using the new window size and what not. |
so that it is run before 'run the resize steps'. The previous timing could cause an issue that the auto-focused element didn't have up-to-date appearance even though 'update the rendering' was done. This fixes whatwg#4992
Specification PR: #5015 |
Now it runs before "run the resize steps". The previous timing could cause an issue that the auto-focused element didn't have up-to-date appearance even though "update the rendering" was done. Fixes #4992. Tests: web-platform-tests/wpt#19747
Now it runs before "run the resize steps". The previous timing could cause an issue that the auto-focused element didn't have up-to-date appearance even though "update the rendering" was done. Fixes #4992. Tests: web-platform-tests/wpt#19747
#4763 added the step 14 to flush autofocus candidates after the step 13 to update the rendering or user interface of that Document and its browsing context. This has two issues:
The text was updated successfully, but these errors were encountered: