Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

fix: prevent user lock in and visually destructed list boxes on small devices #365

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

johanlahti
Copy link
Collaborator

@johanlahti johanlahti commented Oct 10, 2023

Before

Autofocus causes the browser to zoom in and cut off the UI.

image

…and on cancel (stuck in a listbox)

image

After

Zoom is reset on open… and not stuck on cancel.

image

Solution

There is no direct way of resetting the zoom. This solution uses a trick by (re-)setting the meta tag's scale when on small device.

In addition, the offset (top & left) introduced by the popover is now forced to stay at 0 so it does not go outside the viewport and locking in the user.

@johanlahti johanlahti merged commit 2b50771 into main Oct 10, 2023
11 checks passed
@johanlahti johanlahti deleted the fix/search-no-results branch October 10, 2023 11:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants