question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: AutoFocusPlugin doesn't work with many editors

See original GitHub issue

When having many editors, using AutoFocusPlugin to control which editor receives focus doesn’t seem to work

Lexical version: 0.2.9

Steps To Reproduce

  1. Have 2+ editors with and create a boolean autoFocus prop that conditionally renders the AutoFocusPlugin
  2. conditionally active autoFocus on one of the editors
  3. See that it doesn’t have focus

Link to code example: https://codesandbox.io/s/many-lexical-autofocus-ype4po

The current behavior

No editor, or sometimes the last one, receives focus

The expected behavior

The editor with autoFocus={true} should receive focus

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
trueadmcommented, May 26, 2022
0reactions
hanfordcommented, May 26, 2022

@trueadm Hmmmm… probably something on my side then. Sorry about that, will keep digging and open another issue if I can repro

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add an autoFocus property · Issue #785 · facebook/draft-js
I'm proposing this because I'd like to focus the text editor, but I can't use (or don't know how) the focus method. My...
Read more >
In SlateJS, how to change focus to specific editor when ...
I've tried to RTFM but I legitiamtely cannot find anything about managing focus aside from that plugins page. I've tried adding a focusOnRender ......
Read more >
Sony A7iii Face Detection Not Available - Auto Focus Fix
How to turn on and use Face Detection autofocus frame display on the Sony A7iii camera for video recording. There are 5 main...
Read more >
$12 AutoFocus For Blackmagic Cameras Using Your iPhone!
Get 15% Off SoundStripe: https://geni.us/SoundStripeMusicUse Code "initialfocus"Download Focus Puller App: ...
Read more >
Fix Out-of-Focus Footage With This Simple Tip - PremiumBeat
Work around slightly out-of-focus footage with this simple DaVinci Resolve quick tip.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found