uiwjs / uiwjs/react-codemirror

Selection theme color only applied after focus lost

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

When creating a theme. it seems the color we specified on settings.selection is only applied once the editor has lost the focus, but while selecting it uses a default color that we are not able to modify.

For example, with this theme

const myTheme = createTheme({
  theme: 'dark',
  settings: {
    selection: '#f54242',
  },
  styles: [],
});

We can see on this gift the color is only applied after losing focus
sample

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the example using createTheme with settings.selection while the editor remains focused, then compare it with the color after focus is lost. Trace the theme-selection handling in the repository and verify that the configured color is applied during active selection as well as after focus changes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.