plate
plate copied to clipboard
Autofocus & tab to focus doesn't work when editor is empty with placeholder on Safari
trafficstars
Description
On Safari, when there is only an empty paragraph in the editor and there is a placeholder (property placeholder in editableProps) and hitting tab from a previous input, the cursor doesn't show in the editor and I can type anything.
Works fine on Chrome, or when there is text in the editor, or when there is no placeholder
Steps
- Go to https://codesandbox.io/s/plate-playground-2mh1c?from-embed=&file=/index.tsx:4010-4025 on safari
- In the controller, select all with ctrl+a and erase everything with backspace. "Enter some riche text..." placeholder should show.
- Focus on the "Search the text..." input
- Hit tab
- Editor is not focused
Sandbox
https://codesandbox.io/s/plate-playground-v1-2mh1c
Expectation
Editor should be focused, even when empty.
Environment
- slate: 0.66.0
- slate-react: 0.66.0
- plate: 2xx or 3xx
- browser: safari
I have the same experience in Chrome for slate 0.72.x and plate 10.2.x.
having the same issue with Chrome