Skip to content

Conversation

@NomadeLampe
Copy link

Hello, during my work I use Kendo Editor which use this component. It appear that from time to time on Chrome we have the following error TypeError: Cannot read properties of null (reading 'focusNode')\n at EditorView.updateStateInner.

I believe that this small change would prevent this bug.

@NomadeLampe NomadeLampe marked this pull request as ready for review February 17, 2023 11:02
@marijnh
Copy link
Member

marijnh commented Feb 17, 2023

According to the spec Document.getSelection (which is where this value originates) should always return a Selection object unless the document has no browsing context (isn't any window's actual active document). If that is a thing that actually happens in the wild, we'll need to adjust more than just this to account for it. Do you have a way to reproduce this crash or more information about what might be going on when it happens?

@NomadeLampe
Copy link
Author

I have notice this typing from typescript where it return Selection | null but in index.ts the typing looks wrong.

Regarding the way to reproduce it, I will try but I can't copy any code. It happen when use multiple instance of kendo-editor and try to interact with the first one while having a pop-in hiding the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants