Skip to content

Avoid refocusing an already-focused Rooster editor on click - #538

Open
squarepots wants to merge 1 commit into
ProtonMail:mainfrom
squarepots:fix/rooster-editor-click-refocus
Open

Avoid refocusing an already-focused Rooster editor on click#538
squarepots wants to merge 1 commit into
ProtonMail:mainfrom
squarepots:fix/rooster-editor-click-refocus

Conversation

@squarepots

Copy link
Copy Markdown

Guard the Rooster wrapper click handler with editor.hasFocus() so editor.focus() runs only when the editor is not focused. Preserve onFocus for every wrapper click.

Add contract tests covering focused and unfocused editor states.

Verification

Focused red/green GitHub Actions run:

  • Pre-fix: the already-focused case fails; the unfocused case passes.
  • With the change: both cases pass.
  • git diff --check passes.

Fixes #537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid refocusing an already-focused Rooster editor on click

1 participant