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
Hit the system microphone button on the keyboard (not lexical's microphone button)
Begin dictating, adding 2 sentences or so.
After you're done, hit the microphone button again to stop dictation.
At this point, you'll see a good amount of words disappear from the editor.
speech-bug-2.mov
As a first step I'm just opening this ticket to increase exposure in case someone might obviously know what's wrong, before investigating deeper.
Via chatgpt, speech to text uses composition events compared to traditional keyboard input:
• Dictation uses composition events to handle intermediate input. These include:
• compositionstart: Marks the beginning of dictated input.
• compositionupdate: Fires as the text updates.
• compositionend: Finalizes the text input.
• Keyboard input usually doesn’t rely on compositionupdate.
This seems to also affect input with diacritic letters, which also uses composition. Characters are being deleted. Report from a user:
it's most likely because these are often typed with dead keys (i.e. two keystrokes). If typed with a single keystroke, they remain, if typed with a dead ˇ , they disappear. Tried a few random ones and can reproduce consistently
funny thing is that in fact the character does not appear alone, instead, the sequence appears (and vanishes) as two characters, like ˇČ
Explanation via chatgpt again (sorry):
Why Composition Events Are Used
When typing diacritic letters:
1. The user usually starts with a “dead key” (e.g., ´, ^) or a specific key combination (e.g., Alt+e).
2. The browser enters a “composition mode” to wait for the next key input.
3. Once the user types the base letter (e.g., e), the browser combines the diacritic with the base letter and exits composition mode.
This process involves multiple stages, which the browser tracks using composition events.
Please see video.
Steps to replicate:
At this point, you'll see a good amount of words disappear from the editor.
speech-bug-2.mov
As a first step I'm just opening this ticket to increase exposure in case someone might obviously know what's wrong, before investigating deeper.
Via chatgpt, speech to text uses composition events compared to traditional keyboard input:
https://github.com/facebook/lexical/blob/main/packages/lexical/src/LexicalEvents.ts#L899
The text was updated successfully, but these errors were encountered: