Repository navigation
Harden panel anchoring and grid layout against late rotation geometry - #430
Merged
Merged
Conversation
- panel-anchor: a focused checkbox, radio, range or button no longer holds the keyboard correction (it never raises a keyboard and nothing moves focus off it, so the hold could outlive later rotations). Any hidden focused form control is now blurred, not just text fields. - panel-anchor: resample at 150/400/800/1500ms after a viewport event instead of once at 300ms, and also resync on the orientation media query flipping. - grid-view: re-check geometry 1.5s after a resize and on orientation media query changes; keep the timers on the instance so a rebuilt handler cancels the previous one's; skip checks while the grid is hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardening found while investigating a Chrome-on-iPad rotation bug. This does not fix that bug, which turned out to be in Chrome itself (see below). The changes close real gaps in how the UI follows rotation and resize.
panel-anchor.js<select>still hold. On iPhone a select's picker can take the keyboard's place.events.jsignores shortcuts while an INPUT or SELECT has focus.(orientation: portrait)media query changes.grid-view.jsThe Chrome bug this does not fix
On Chrome for iPad (CriOS 157.0.8103.37, iPadOS 26.6), rotating landscape → portrait leaves
documentElement.clientWidth,100vw/100dvhand the(orientation: portrait)media query at the landscape values.innerWidthandscreen.orientationdo update. InvokeAI is affected in the same way, and Safari is fine.None of the page-side workarounds helped:
shrink-to-fit=nowidth=<innerWidth>Users should use Safari, or reload after rotating, until Chrome is fixed.
Test plan
npm test: 1044 passing. New tests cover the non-text-control holds, late settle resampling, the media-query resync and blurring a hidden select. 7 of the new tests fail without the change.npm run lint,npm run format:check🤖 Generated with Claude Code