facebookarchive / draft-js

A React framework for building text editors.

Home Page:https://draftjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pressing return jumps to start of line in Android API 33

tseringn opened this issue · comments

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Currently the pressing return in keyboard jumps start of the line in Android 13, but when entering space and then pressing return goes as expected to the next line. Did some debugging and found

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/gmertk/e61z7nfa/.

used default code in the above jsfiddle link

Screen Record of actual bug

Screen.Recording.2022-09-26.at.10.05.03.PM.mov

What is the expected behavior?

pressing return should go to next line

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

latest draft js, Android 13 pixel 5 vm, on MacOs 12.6

--EDIT--
The editorState.getCurrentInlineStyle() does not returns an empty array even if there are bunch of inline styles, until white space is encountered

This is pretty serious bug for me, so a workaround or a fix will be very much appreciated