From 411a07a64e6fe048dff2e2d339db4ea260053382 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 26 Aug 2015 15:31:50 +0200 Subject: [PATCH] [FIX] web: enable default_focus on html field closes #8244 opw-647578 --- addons/web/static/src/js/view_form.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9172df0efe4..0874792003f 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2765,6 +2765,10 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc } } }, + focus: function() { + var input = !this.get("effective_readonly") && this.$cleditor + return input ? input.focus() : false; + }, render_value: function() { if (! this.get("effective_readonly")) { this.$textarea.val(this.get('value') || '');