fix: focus the tile pane when clicking its empty canvas (0.8.3-beta1) - #4
Merged
Conversation
A tile click already focused the ListBoxItem, so arrows and PageUp/PageDown moved the grid. A click on the empty canvas did not, and the folder tree kept keyboard focus. Claim focus at the contents-pane level on canvas clicks; leave tiles, section headers, text boxes, and dialogs alone. Version 0.8.3-beta1 so merge re-exercises auto-tag/release. Co-authored-by: Paul Smith <piranout@users.noreply.github.com>
CS0051: xUnit theories are public, so the Hit enum cannot appear in the signature. Split into facts that use the enum only inside the body. Co-authored-by: Paul Smith <piranout@users.noreply.github.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.
What
Usability bug: after clicking a folder in the tree, a click on the empty canvas of the tile/contents pane did not move keyboard focus. Arrows, PageUp/PageDown, and scroll keys stayed on the tree. Clicking a tile already transferred focus (the
ListBoxItemfocuses itself). Canvas should do the same.Cause (verified): the ListBox is Focusable, but WPF only focuses a tile because
ListBoxItemcallsFocus()on mouse-down. An empty-canvas click hits chrome that never claims keyboard focus, so the tree keeps it. Not a missingFocusableflag on the ListBox itself.Fix (pane-level):
BrowserHostis hit-testable (Background="Transparent") and handlesPreviewMouseLeftButtonDown. Canvas clicks callItemsList.Focus(). One decision path (LibraryPaneFocus) skips:Tree-click behavior is unchanged (handler is only on the contents pane). Tile-click behavior is unchanged.
Version is 0.8.3-beta1 in
Aperture.App.csprojso merge re-exercises the auto-tag/release path. CHANGELOG has## [0.8.3-beta1].How to test
dotnet test tests/Aperture.Core.Tests/Aperture.Core.Tests.csproj— includesLibraryPaneFocusTests(the claim/skip contract). Live WPF focus is not unit-tested (no dispatcher circus).Notes
v0.8.3-beta1.