summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-11-04 13:31:44 +0100
committerChristophe Matthieu <chm@odoo.com>2015-11-04 16:10:44 +0100
commit7228b29cb2dfca8004ef65d41fa588cbed367121 (patch)
tree881a96f37b4fab1901251d09b84a13b55ef3360d /addons/web_editor/static/src/js/rte.js
parent554bfa7d1075bff3598d7dec1bd084f3c4a70243 (diff)
[FIX] web_editor: edition of monetary value
Issue: if the currency is before the value and we try to add a number at the begin of the value, the number is not saved (because the browser insert the number before the span). Add a onEnableEditableArea in the rte to change the contenteditable value and the default behavior.
Diffstat (limited to 'addons/web_editor/static/src/js/rte.js')
-rw-r--r--addons/web_editor/static/src/js/rte.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/rte.js b/addons/web_editor/static/src/js/rte.js
index d1f94ed46f5..a2833334085 100644
--- a/addons/web_editor/static/src/js/rte.js
+++ b/addons/web_editor/static/src/js/rte.js
@@ -546,9 +546,14 @@ var RTE = Widget.extend({
if (dom.isImg($target[0])) {
$target.trigger('mousedown'); // for activate selection on picture
}
+
+ rte.onEnableEditableArea($editable);
}
},
+ onEnableEditableArea: function ($editable) {
+ },
+
onMouseup: function (event) {
var $target = $(event.target);
var $editable = $target.closest('.o_editable');