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
We hide sections of the editor using decorations and it works great when dragging from top to bottom, but for bottom to top the behavior is different and the selection is interrupted.
Rather than being caused by the hidden content itself, this appears in some way to be related to Decoration.widget. If we remove the widgets but keep everything else the same, the selection can be expanded in either direction as expected. I'm not sure why they might interfere.
The issue does not affect Shift+Click to expand selections, only pure drag-based selections.
Selection-order-matters-but-unsure-why.mp4
The video is from Chrome on Linux. It behaves fundamentally the same in Firefox, although it does select some text on the upper line unlike Chrome.
I'm sure this is entirely insufficient to really reveal the root cause, but I found commenting this line out prevents the issue: