summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-09-01 11:31:40 +0200
committerNicolas Lempereur <nle@odoo.com>2015-09-25 08:30:23 +0200
commit144b4f809862768de416be038f29b244919f7b70 (patch)
treea5311726b53204415fea5853ec18ad05f511bf21 /addons/web_editor
parenta3d355ada763cefb965bbe22ab2e4b45b0f9abbb (diff)
[FIX] website: range lost in phantomjs
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/tour.rte.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/tour.rte.js b/addons/web_editor/static/src/js/tour.rte.js
index dbf63538ae6..c8d9ed9a123 100644
--- a/addons/web_editor/static/src/js/tour.rte.js
+++ b/addons/web_editor/static/src/js/tour.rte.js
@@ -72,6 +72,11 @@ Tour.register({
{
element: 'div[data-target-event="foreColor"]:visible .note-color-row:eq(1) button[data-event="foreColor"]:first',
title: "change text color",
+ onload: function () {
+ /* TODO: find why phantomjs lose the focus and remove this onload */
+ var $el = $('#wrapwrap > main > div > section .row > div:first:not(:has(p font)) h1 font');
+ $.summernote.core.range.create($el[0].firstChild, 5, $el[0].firstChild, 10).select();
+ }
},
{
waitFor: '#editable_area > section .row > div:first h1 font:eq(2)',