mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-17 22:46:48 +01:00
Fix blur de-select speed
This commit is contained in:
@@ -151,9 +151,11 @@ function getExtensions({
|
||||
// Clear selection on blur
|
||||
EditorView.domEventHandlers({
|
||||
blur: (e, view) => {
|
||||
// Clear selection on blur. Must do on next tick or updating selection
|
||||
// will keep the editor focused
|
||||
setTimeout(() => {
|
||||
view.dispatch({ selection: { anchor: 0, head: 0 } });
|
||||
}, 100);
|
||||
view.dispatch({ selection: { anchor: 0, head: 0 } }, { userEvent: 'blur' });
|
||||
});
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user