Playground selection bar: comes back after Apply or scrolling while focus is in the Markdown pane

Open Beginner friendly
#175 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
desktop, testing

Research direction

Read samples/SIL.TextEditing.Playground/PlaygroundView.SelectionBar.cs, especially UpdateSelectionBar and SelectionBarFocusMoved, to see how focus is checked and the bar is hidden. Add the described focus behavior and a test that focuses the Markdown pane, applies, and verifies the bar stays closed; done when the bar remains closed after Apply without focus in the field or bar.

Written by the indexing model from the issue text.

Description

From the review of #174. UpdateSelectionBar (samples/SIL.TextEditing.Playground/PlaygroundView.SelectionBar.cs) never checks focus. Focus leaving the field hides the bar (SelectionBarFocusMoved), but a later Apply in the Markdown pane, or scrolling the field, calls UpdateSelectionBar and the bar opens again over the unfocused field.

Fix: at the top of UpdateSelectionBar, hide unless the field or the bar has focus, reusing the check in SelectionBarFocusMoved. Then add a test: focus the Markdown pane, apply, and check that the bar stays closed.

🤖 Generated with Claude Code

Dominant language
C#
Stars
0
Forks
0
Avg merge
1h 43m
Merged PRs (30d)
43

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sillsdev/SIL.TextEditing

All issues in sillsdev/SIL.TextEditing

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.