mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-24 15:49:59 +08:00
Added auto-focus behaviour to page editor
- Will focus on title if the value of the field matches the default text for the current user's language. - Otherwise will focus on the editor body. - Added and tested on both editors. For #2036
This commit is contained in:
@ -402,6 +402,10 @@ function listenForBookStackEditorEvents(editor) {
|
||||
editor.setContent(content);
|
||||
});
|
||||
|
||||
// Focus on the editor
|
||||
window.$events.listen('editor::focus', () => {
|
||||
editor.focus();
|
||||
});
|
||||
}
|
||||
|
||||
class WysiwygEditor {
|
||||
|
Reference in New Issue
Block a user