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
You can create an exception sink which is supposed to receive extension errors, but EditorView.updateListener doesn't actually use the sink despite being an extension. Instead, if an updateListener throws it just causes the entire dispatch to throw, rather than unmounting the listener, like a view plugin.
I genuinely feel like this is a bug, so I'm making an issue. I've attached a reproduction that demonstrates this. The sink won't be called despite the listener throwing on every keystroke. Something to note is that despite the listener throwing, the update is still "successful", which I feel like is strange result if technically the update method is throwing.
Describe the issue
You can create an exception sink which is supposed to receive extension errors, but
EditorView.updateListener
doesn't actually use the sink despite being an extension. Instead, if anupdateListener
throws it just causes the entire dispatch to throw, rather than unmounting the listener, like a view plugin.I genuinely feel like this is a bug, so I'm making an issue. I've attached a reproduction that demonstrates this. The sink won't be called despite the listener throwing on every keystroke. Something to note is that despite the listener throwing, the update is still "successful", which I feel like is strange result if technically the update method is throwing.
Browser and platform
No response
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge2phdmFzY3JpcHR9IGZyb20gIkBjb2RlbWlycm9yL2xhbmctamF2YXNjcmlwdCIKCmNvbnN0IHNpbmsgPSBFZGl0b3JWaWV3LmV4Y2VwdGlvblNpbmsub2YoKGVycikgPT4gewogIGNvbnNvbGUubG9nKCdJIGdvdCBhbiBlcnJvciEnLCBlcnIpCn0pCgpjb25zdCBiYWRMaXN0ZW5lciA9IEVkaXRvclZpZXcudXBkYXRlTGlzdGVuZXIub2YoKHVwZGF0ZSkgPT4gewogIGlmICh1cGRhdGUuZG9jQ2hhbmdlZCkgewogICAgdGhyb3cgbmV3IEVycm9yKCd3aG9vcHMnKQogIH0KfSkKCm5ldyBFZGl0b3JWaWV3KHsKICBkb2M6ICJjb25zb2xlLmxvZygnaGVsbG8nKVxuIiwKICBleHRlbnNpb25zOiBbYmFzaWNTZXR1cCwgamF2YXNjcmlwdCgpLCBzaW5rLCBiYWRMaXN0ZW5lcl0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==
The text was updated successfully, but these errors were encountered: