#6051·slate

On Firefox for Android with the Samsung Keyboard, Slate fails to insert some characters

Author: nsoriano-druideCreated Apr 16, 2026Updated Apr 17, 2026
Labelsbug⚑ cross platform

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.

https://github.com/user-attachments/assets/3a8b13ce-b6d6-4bbb-a55a-b5789fc92542

And here is a screenshot of the error. Image

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:

  1. Go to the slate examples
  2. Add a new line
  3. Insert a character (ex: "Y")
  4. Insert a second one (ex: "o")
  5. 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.