diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-02-03 15:25:01 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2020-02-04 10:59:22 +0000 |
| commit | 537644ec3e54bde63d77a33eaf4acccd3c367ac4 (patch) | |
| tree | 996d77f939a7352a1dd643e4dc240d8503d7061c /addons/web_editor/static | |
| parent | d92f76592c1929e4cf876c615e3be03621b17abd (diff) | |
[IMP] website_blog: activate cover snippet on edit mode enter
As this is the first thing you want to do when creating a blog, it will ease
the onboarding.
task-2144335
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index 9a64abd4247..b8ab92a3d8d 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -943,6 +943,11 @@ var SnippetsMenu = Widget.extend({ $(range && range.sc).closest('.o_default_snippet_text').removeClass('o_default_snippet_text'); }); + const $autoFocusEls = $('.o_we_snippet_autofocus'); + if ($autoFocusEls.length) { + this._activateSnippet($autoFocusEls.first()); + } + return Promise.all(defs).then(() => { this.$('[data-title]').tooltip({ delay: 0, |
