diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-09-09 17:34:38 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-09-13 14:25:41 +0200 |
| commit | 142b177c5c8e3c6192c95af85b68c66d80995f54 (patch) | |
| tree | 8ebe8099c34751b1925a68403e0fb3ce06d7d239 /addons/web_editor/static/src/js/snippets.editor.js | |
| parent | d83f7587aae3fd2fcd4b6c4622ee7bcca9e80abe (diff) | |
[IMP] web_editor: select default text on click instead of mouseup
When a snippet contains two p elements, they will both get the
"o_default_snippet_text" when placed in the page. The individual p are
then automatically selected on mouseup event. This induces strange
behavior when trying to select the two paragraph together ; indeed
only the paragraph on which you mouseup will be selected.
Diffstat (limited to 'addons/web_editor/static/src/js/snippets.editor.js')
| -rw-r--r-- | addons/web_editor/static/src/js/snippets.editor.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js index e4885593029..a628b6110e8 100644 --- a/addons/web_editor/static/src/js/snippets.editor.js +++ b/addons/web_editor/static/src/js/snippets.editor.js @@ -263,7 +263,7 @@ data.Class = Widget.extend({ .filter(function () { return this.nodeType === 3 && this.textContent.match(/\S/); }).parent().addClass("o_default_snippet_text"); - $(document).on("mouseup", ".o_default_snippet_text", function (event) { + $(document).on("click", ".o_default_snippet_text", function (event) { $(event.target).selectContent(); }); $(document).on("keyup", function (event) { |
