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
Description
On Firefox for Android, using the Samsung Keyboard, entering characters fails and is accompanied by an error in the console. Notably, it seems to always happen with the second character on a new line.
Recording
Here is a recording of the anomalous behaviour.
bug_android_firefox_samsung_slate.mp4
And here is a screenshot of the error.
Sandbox
It can be reproduced using the Rich Text Example (https://www.slatejs.org/examples/richtext) on an android device using Firefox for Android and the Samsung Keyboard.
Steps
To reproduce the behavior:
Go to the slate examples
Add a new line
Insert a character (ex: "Y")
Insert a second one (ex: "o")
The second character does not appear and, if you have access to its web console (e.g. through the Firefox debugger), an error appears in the console ("Uncaught TypeError: can't access property "hasAttribute", s is null")
Expectation
No error
and the character is correctly inserted.
Environment
Slate Version: 0.124.1 (current version as of testing) -> but also present on 0.118.1, 0.121, 0.123 (I did not test on 0.120)
Operating System: Android
Browser: Firefox for Android
Keyboard: Samsung Keyboard
Context
The error seems to be in the android handleDOMBeforeInput. The beforeinput event's startContainer and endContainer have parentNode that are null which leads to an error in the toSlateRange -> toSlatePoint call in the handleDOMBeforeInput.
Description
On Firefox for Android, using the Samsung Keyboard, entering characters fails and is accompanied by an error in the console. Notably, it seems to always happen with the second character on a new line.
Recording
Here is a recording of the anomalous behaviour.
bug_android_firefox_samsung_slate.mp4
And here is a screenshot of the error.

Sandbox
It can be reproduced using the Rich Text Example (https://www.slatejs.org/examples/richtext) on an android device using Firefox for Android and the Samsung Keyboard.
Steps
To reproduce the behavior:
Expectation
No error
and the character is correctly inserted.
Environment
Context
The error seems to be in the android handleDOMBeforeInput. The beforeinput event's startContainer and endContainer have parentNode that are null which leads to an error in the toSlateRange -> toSlatePoint call in the handleDOMBeforeInput.