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

Light dismiss on window resize #247

Closed
JanMiksovsky opened this issue Jan 14, 2021 · 2 comments
Closed

Light dismiss on window resize #247

JanMiksovsky opened this issue Jan 14, 2021 · 2 comments
Labels
popover The Popover API stale

Comments

@JanMiksovsky
Copy link

As a tangent to light dismiss on window blur, I propose that light dismiss also occur on window resize.

This is primarily an issue on Windows, which commonly lets a user resize a window even when a system popup is open.

Some precedents on Windows:

  • If you open a <select> in Chrome/Edge/Firefox/IE and resize the window, the select closes.
  • If you open a popup (context menu, toolbar button menu) in various Microsoft Office apps and resize the window, the popup closes.

As with window blur, the fact that the user has switched from the popup to a window resize task can generally be taken as a sign the user may no longer be interested the popup anymore, and the popup can be implicitly dismissed.

There are fewer precedents on macOS, which generally disables window resize with a mouse while a system popup is open. That said, it is possible to resize a window while a popup is open with custom keyboard shortcuts that move a window. And in any event, a web developer has no means of disabling window resize, so it's possible to resize a web browser while a custom popup is open. Given that, it seems reasonable to apply the same default behavior on macOS as well, i.e., have light dismiss occur on window resize.

(Heads up @dandclark and other people working on Chromium browsers: In exploring this on Windows, I found a bug in Edge/Chrome: open a select, press Windows+Left or Windows+Right to resize the window → the window moves, but the select popup can remain visible in the location it had before the window moved.)

If you want to see an example of a web component with a popup that dismisses on window resize, see the demos for Elix DropdownList.

@gregwhitworth gregwhitworth added the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Jan 20, 2021
@gregwhitworth gregwhitworth removed the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Jan 26, 2021
@github-actions
Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label Mar 19, 2022
@mfreed7 mfreed7 added the popover The Popover API label Mar 21, 2024
@mfreed7
Copy link
Collaborator

mfreed7 commented Mar 21, 2024

Given the age of this issue, and the fact that Popover has shipped without this behavior, I'm going to close the issue. Thanks!

@mfreed7 mfreed7 closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
popover The Popover API stale
Projects
None yet
Development

No branches or pull requests

3 participants