Open dpranav007 opened 1 week ago
@dpranav007 is this just with A-Z, a-z and 0-9 or any keys?
If it's just those keys specifically, it's probably an issue with onbeforeinput events and there's a single regex that you can change to not use native onbeforeinput events.
@dylans Yes, the extra character behavior is only for A-Z, a-z. No extra inputs are visible when input is 0-9 or any special chars ($%^&*, etc)
The behavior is only happening at first input of the input box(when input box is empty) and not further in any sentence.
Also another issue that happens starting a new line/para(after 'enter' key press) the cursor moves 1 character back and letters show up in reverse order. This is applicable to special chars ($%^&*, etc) as well where the cursor moves backward Sharing a video here. Thanks a lot. Appreciate it!
https://github.com/ianstormtaylor/slate/assets/13598727/50865333-29dd-4c0e-94e2-450035a8c98b
Description Touch screen TV(android) + firefox browser creates extra instances of the characters being typed. Typing quickly in some cases makes the characters repeat in sequence. Only occurs for on-screen keyboard. Not any physically attached one.
Eg. Typing 'ABC'(quickly) results in -> 'ABCABCABABA' being show up Typing just 1 character - 'A' gets an extra character 'AA'
Recording From slatejs website - https://www.slatejs.org/examples/richtext
https://github.com/ianstormtaylor/slate/assets/13598727/303b7b17-ff5f-4af3-b3cc-6bc35ab6a1bc
Sandbox https://www.slatejs.org/examples/richtext
Steps To reproduce the behavior:
Expectation A clear and concise description of what you expected to happen. (Often it's helpful to test out the behavior of other editors like Google Docs, Medium, Notion, etc. to see how they handle the same issue.)
Environment