froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 675 forks source link

Autofocus no longer works in v3.2.2 #4058

Open ghost opened 4 years ago

ghost commented 4 years ago

Description:

When setting the autofocus configuration option to true, the editor should be focused upon initialization.

Actual:

When initializing, the editor does not have focus and the caret is not visible.

Steps to reproduce:

The following sandbox uses froala/wysiwyg-editor@3.2.2 and react-froala-wysiwyg@3.2.2-1. Downgrading both to v3.0.5, the focus is correctly set to the editor.

https://codesandbox.io/s/froala-autofocus-forked-qrihn

monika-agg commented 4 years ago

@jhchill666 I also faced the similar issue, this is the bug in the latest version 3.2.2. For the time being you can use the editor.el.focus() to set focus into the editor.