-
Notifications
You must be signed in to change notification settings - Fork 213
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
Window Controls Overlay resize events #274
Comments
I don't believe there is a precedent for In contrast, the window controls overlay is a "permanent" piece of the browser chrome that is occluding the client area, so when the size of the overlay changes, the effective client area changes as well, even though the rectangular client area bounds are not affected. We had previously considered introducing a new event to signal the resize (discussion here: #184) , but ultimately decided to stick with reusing
I think it makes more sense to only fire when complete. There are two layout options:
|
Thanks for the thoughtful reply. I worried that existing resize handlers would now have to distinguish between client bounds and overlay bounds changes, but that's only true for sites opting into this feature, and perhaps it's doubtful that such sites would blindly trigger a complex manual layout on each resize event, wrongly assuming that resize always pertains to client bounds. I guess my question about the frequency of resize events is equally applicable to the frequency of changes to the CSS environment variables. I suspect that both firing 'resize' and changing CSS values when the overlay completes its transition is reasonable. It would be nice as a user to see site content animate in tandem with overlay text and buttons sliding in/out, but a separate animation like you describe would probably be sufficient. It might be nice to document the intended timing of JS events and CSS value changes in the explainer. |
The Window Controls Overlay explainer mentions firing the resize event when the origin or a page action (extension/translate/etc. buttons) shows or hides in the overlay.
I hope the explainer/spec might explore some considerations here:
The text was updated successfully, but these errors were encountered: