From 5b5f89e2bec678ad683eacd681ba84bbe48a4441 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 29 Oct 2015 14:47:58 +0100 Subject: [PATCH] [FIX] web_editor: select default text of the snippet when click on the text --- addons/web_editor/static/src/js/snippets.editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js index 227b94ca6f6..79db510bf6a 100644 --- a/addons/web_editor/static/src/js/snippets.editor.js +++ b/addons/web_editor/static/src/js/snippets.editor.js @@ -316,11 +316,11 @@ var BuildingBlock = Widget.extend({ $("body").toggleClass("editor_has_snippets", !!number); // select all default text to edit (if snippet default text) - /*self.$snippets.find('.oe_snippet_body, .oe_snippet_body *') + self.$snippets.find('.oe_snippet_body, .oe_snippet_body *') .contents() .filter(function() { return this.nodeType === 3 && this.textContent.match(/\S/); - }).parent().addClass("o_default_snippet_text");*/ + }).parent().addClass("o_default_snippet_text"); $(document).on("mouseup", ".o_default_snippet_text", function (event) { $(event.target).selectContent(); });