plate icon indicating copy to clipboard operation
plate copied to clipboard

Passing autofocus as an Editable prop results in a focus event but no cursor

Open davisg123 opened this issue 2 years ago • 5 comments

Description

Passing autofocus as an Editable prop results in a focus event but no cursor

Steps

  1. Use autoFocus as a prop
  2. no focus

Sandbox

https://codesandbox.io/s/dbgrman-plate-playground-forked-vozips?file=/index.tsx

Expectation

Focus with cursor

Environment

  • slate: 0.78.0
  • slate-react:
  • browser: chrome & safari

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

davisg123 avatar Jun 15 '22 02:06 davisg123

I just encountered the same bug. Autofocus does not seem to work.

reinvanimschoot avatar Jun 16 '22 08:06 reinvanimschoot

Workaround: https://codesandbox.io/s/sandpack-project-forked-ln6xsm?file=/App.tsx

zbeyens avatar Aug 10 '22 14:08 zbeyens

Looks to work in v19

zbeyens avatar Jan 26 '23 19:01 zbeyens

This doesn't seem to work in nested editors though.

reinvanimschoot avatar Feb 27 '23 10:02 reinvanimschoot

any updates on this? The work around really doesn't gel with nested editors.

reinvanimschoot avatar May 23 '23 11:05 reinvanimschoot