Codemirror is failing in the unit tests. Undefiend exception on (this.observer.delayedAndroidKey #1430
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the issue
I am trying to run codemirrow from the headless mode using vitest.
versions:
Somehow this.win.requestAnimationFrame is starting measurments before observer is actually initialized or set.
redraw scheduler is started:
Next code is failing while observer is not initialized yet:
Stack trace:
Expected result:
Don't crash application when non critical operation cannot be performed.
Browser and platform
Edge, windows
Reproduction link
See code above.
Can be also an issue that you need to first cancelAnimationFrame and only then destroy observer.
Cancel animation frame first?
Another exception
Both functions are deprecated.
The
EditorViewconstructor synchronously initializesthis.observer, and animation frames run asynchronously, so this isn't really possible unless therequestAnimationFramein your test environment is weird.Here too, if you're running this in a pseudo-browser that doesn't support the standards (in this case
MediaQueryList.removeEventListenerorremoveListener), that's not something I'm going to adjust the library for.