Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double highlighting selection when using drawSelection. #573

Merged

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.

Verified

This commit was signed with the committer’s verified signature.
SgtCoDFish Ashley Davis
@jaywcjlove jaywcjlove merged commit 7c5585a into uiwjs:master Sep 21, 2023
github-actions bot pushed a commit that referenced this pull request Sep 21, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…ion. (#573) 7c5585a
@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.

None yet

2 participants