Skip to content

Conversation

ethan-vanderheijden
Copy link
Contributor

When you use the drawSelection() extension, it hides the current selection through:

& .cm-line ::selection {
    background-color: transparent !important;
}

However, we were styling selections using:

&.cm-focused .cm-line ::selection {
    background-color: <some background color> !important;
}

Since our style is more selective, it takes precedence over the original style that was supposed to hide the current selection. As a result, if you use drawSelection(), the selection would be highlighted twice, once through .cm-selectionBackground and once through .cm-line::selection.

@jaywcjlove jaywcjlove merged commit 7c5585a into uiwjs:master Sep 21, 2023
@ethan-vanderheijden ethan-vanderheijden deleted the fix-double-highlighting-selection branch September 22, 2023 05:39
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.

2 participants