You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
When dragging the drag handle to select text, sometimes it gets "stuck" and can't be moved anymore. Seems to happen more often if you move the drag handle quickly.
I can reproduce this. It seems to be related to highlightSelectionMatches causing DOM changes around the selection (adding the wrapper nodes that do the highlighting), which somehow causes Chrome to decide the drag needs to be aborted. The only solution I was able to find was to turn off highlightSelectionMatches.
We're experiencing something similar (although not using highlightSelectionMatches) in Obsidian where selecting in a long document with heavy formatting causes the drag to be aborted almost every paragraph, which makes selecting large parts of the document really difficult. If I remember correctly we are already detecting that this drag has started and we stop making any decoration changes during a drag.
Do you have any suggestion on how we can isolate the cause on our side?
By 'isolate' you mean find out which decoration is triggering this? I guess you could turn off extensions one by one to see which one(s) affect this problem.
So far I've isolated the problem to multiple extensions. One of the offenders was an active line highlighter which added .cm-active to the currently selected line (which got updated as the selection changed).
But even disabling it I found that just having block widgets in general will cause the issue to happen from time to time when the selection crosses over the block widget.
Were you able to reproduce it with the block widgets? I can remove the line highlighter for Android, but I don't really have a good workaround for block widgets...
Nope. I tried to get highlightSelectionMatches to stop changing the DOM during selection, but it appears a script cannot even really detect that that is happening, since no touch events are fired for selection handle dragging.
So I think all I can do here is call this a browser issue. You could try to set up a small script without CodeMirror that displays the problem, and report it to the Blink team.
Ah that's unfortunate. We internally were able to debounce on selection change to block all widget changes while the selection was rapidly changing, and flush later. This works for our active line highlighter widget, but it seems that selection still gets stuck on random occasions when crossing block widgets.
Activity
marijnh commentedon Feb 16, 2026
I can reproduce this. It seems to be related to
highlightSelectionMatchescausing DOM changes around the selection (adding the wrapper nodes that do the highlighting), which somehow causes Chrome to decide the drag needs to be aborted. The only solution I was able to find was to turn offhighlightSelectionMatches.lishid commentedon Feb 16, 2026
We're experiencing something similar (although not using highlightSelectionMatches) in Obsidian where selecting in a long document with heavy formatting causes the drag to be aborted almost every paragraph, which makes selecting large parts of the document really difficult. If I remember correctly we are already detecting that this drag has started and we stop making any decoration changes during a drag.
Do you have any suggestion on how we can isolate the cause on our side?
marijnh commentedon Feb 16, 2026
By 'isolate' you mean find out which decoration is triggering this? I guess you could turn off extensions one by one to see which one(s) affect this problem.
lishid commentedon Feb 16, 2026
You're right, I should have thought of that. Will report back.
lishid commentedon Feb 16, 2026
So far I've isolated the problem to multiple extensions. One of the offenders was an active line highlighter which added
.cm-activeto the currently selected line (which got updated as the selection changed).But even disabling it I found that just having block widgets in general will cause the issue to happen from time to time when the selection crosses over the block widget.
Repro link
Screen_Recording_20260216_125809_Chrome.mp4
lishid commentedon Feb 19, 2026
Were you able to reproduce it with the block widgets? I can remove the line highlighter for Android, but I don't really have a good workaround for block widgets...
marijnh commentedon Feb 19, 2026
Nope. I tried to get
highlightSelectionMatchesto stop changing the DOM during selection, but it appears a script cannot even really detect that that is happening, since no touch events are fired for selection handle dragging.So I think all I can do here is call this a browser issue. You could try to set up a small script without CodeMirror that displays the problem, and report it to the Blink team.
lishid commentedon Feb 19, 2026
Ah that's unfortunate. We internally were able to debounce on selection change to block all widget changes while the selection was rapidly changing, and flush later. This works for our active line highlighter widget, but it seems that selection still gets stuck on random occasions when crossing block widgets.
marijnh commentedon Apr 15, 2026
This issue has been moved to issue #1675 on the repository's new home.