StackExchange / StackExchange/Stacks-Editor

Image popover steals cursor focus

Open
#122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue mode - rich text
Dominant language
TypeScript
Stars
437
Forks
61
Avg merge
16h 2m
Merged PRs (30d)
8

Description

Describe the bug
When using the arrow keys to move through a document the image popover "steals" the cursor focus from the document when the image is considered "selected".

To Reproduce
Steps to reproduce the behavior:

  1. Open the default demo page
  2. Place the cursor near the Kermit gif
  3. Use the arrow left/right keys to move the cursor past the image
  4. Note that as soon as the image is focused, the cursor moves to the popover and cannot leave

Expected behavior
The cursor should continue moving through/past the image with out focus being stolen. Ideally, focus would only be stolen when clicking on the image directly.

Contributor guide

Open the contributing guide

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.

Research direction

Start with the default demo page and reproduce the arrow-key navigation around the Kermit image. Inspect the image popover's focus behavior when the image becomes selected; the work is done when the cursor can move past the image without focus being stolen, while clicking the image can still focus the popover.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.