CodeMirror line numbers are user-selectable
Description
As shown in the screenshot below, selecting text in CodeMirror also selects the line numbers in the gutter. I'm pretty sure this is a recent regression, but I haven't rolled back my instance to identify exactly when it was introduced.
When copying the selected text, the line numbers are not included in the clipboard, so it's strictly a visual issue and does not otherwise interfere with editing.
I added the following rule with my browser's developer tools and can confirm that this addressed the issue, but there are many source files where this could be added and I'm not sure which option the team would prefer.
.CodeMirror-linenumber {
user-select: none;
}Steps to reproduce
- Open the code editor
- enter some text
- select that text
- observe that the line numbers are also selected
Relevant logs
Expected behavior
CodeMirror's line numbers should not be highlighted.
Which operating system are you using?
Linux/BSD/UNIX
What browsers are you seeing the problem on?
Mozilla Firefox
Extensions
tested in a private browser with no extensions
Version
2026.5.1
Source: cryptpad/cryptpad