From 5f85a7605abde5f29dd1663f95561943e1f8dec5 Mon Sep 17 00:00:00 2001 From: Krupa Patel Date: Thu, 6 Feb 2020 11:18:20 +0000 Subject: [PATCH] [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) --- addons/web_editor/static/src/js/wysiwyg/widgets/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); });