Open MrMugame opened 5 days ago
Oh this is very interesting! Will require thorough testing though, so will get into this when I'm back
If this works as advertised it solves by primary and long lasting gripe with live preview in CodeMirror. Super exciting!
Ok, this is more of shot into the blind. It does a few things:
select.pointer
events and fires an empty transaction onmouseup
, which basically replicates obsidians behaviour for selections, meaning while you still hold down the mouse nothing happens and only when you let go, the view updates. This removes all the weird jitter/feed-back loops when selecting.click
as that is also the normal behaviour of<a>
s. It just seems weird that sometimes stuff happens onmouseup
and sometimes onmousedown
(Maybe there is a reason, but I couldn't think of one). This also sometimes caused problems: When you for example select some text and end on a link with the cursor, that link triggered.drawSelection()
extension. This maybe controversial and is definitely up for debate, but to me the default browser selection behaviour just seems more natural and we aren't using multi cursor/selection stuff anyways.I'd love some feedback on this