can't programmatically focus the editor anymore...
See original GitHub issueDo you want to request a feature or report a bug?
feature
What’s the current behavior?
There’s no longer a way to give programmatically focus to the content-editable element.
In slate 0.4x it was possibile to attach a ref to the <Editor>
component. This is no longer the case because <Editable>
is a stateless component
Slate: 0.57.0 Browser: all OS: all
What’s the expected behavior?
It should be possible to give focus programmatically to the editor
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
how react programmatically focus input - Stack Overflow
I'm trying to implement a very simple use case, a UI feature, where: There is a label with some content in it; If...
Read more >ASPxGridView - Cannot set focus to ASPxMemo in Edit Form ...
Hi, I have a gird.Edit form as popup, one aspxmemo input field is there in edit popup. While click on AddNewRow or edit...
Read more >Setting keyboard focus to edit control. - MSDN - Microsoft
I tried using SendDlgItemMessage(hwnd,IDC_USERID,WM_SETFOCUS,0,0); The problem with this is that i cant write in that edit control anymore.
Read more >Can't focus on ios - Discuss - ProseMirror
My problem: Neither focus() on my editor view instance nor editorViewInstance.dom.focus() will trigger the keyboard to show on ios.
Read more >React Focus on an Input Field - OutSystems
One minor requirement is to set the focus to the Input box on the next form. The JS fuction on that Focus client...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is this documented anywhere?
@MarkPare I found that you can import ReactEditor from slate-react and it has a focus method. Here is how you can use it.
With
editor
being an instance of your editor. You can get it fromcreateEditor()
oruseSlate()
depending on where do you need it.