[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>
This commit is contained in:
Krupa Patel
2020-03-06 13:47:16 +00:00
committed by qsm-odoo
parent 034d1c1c7f
commit 5f85a7605a
@@ -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);
});