diff options
| author | Krupa Patel <kup@odoo.com> | 2020-02-06 11:18:20 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-03-06 13:47:16 +0000 |
| commit | 5f85a7605abde5f29dd1663f95561943e1f8dec5 (patch) | |
| tree | d645ffef887c4cbc0bf8da9fe7257e7f8e78232e | |
| parent | 034d1c1c7f7bc33018d6343a6da509505f3f5ed3 (diff) | |
[FIX] web_editor: add focus in url input of link dialog
Before this commit, when clicking on the link button after focusing a
link, the first input of the link dialog was hidden (label), and the
second input (URL) was not focused.
In this commit, we focus the first *visible* input so users are able to
directly copy-paste URL.
task-2083209
closes odoo/odoo#44931
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js b/addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js index dad2830278e..516aa4bee47 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js @@ -36,7 +36,7 @@ var SummernoteDialog = Dialog.extend({ var self = this; this.opened(function () { - self.$('input:first').focus(); + self.$('input:visible:first').focus(); self.$el.closest('.modal').addClass('o_web_editor_dialog'); self.$el.closest('.modal').on('hidden.bs.modal', self.options.onClose); }); |
