summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-11-17 14:22:46 +0100
committerChristophe Simonis <chs@odoo.com>2017-11-17 14:22:46 +0100
commit21dd24c071fe09e9157ddbf44b90925709744f40 (patch)
tree418270e124d24e95706fc83ab0fe9001fb21aa9a /addons/web_editor
parent6f3608e945f5d5127f5c7ecaf7ad50be94735055 (diff)
parentca3390fd0563233a9b6674f1c017569ad01ef540 (diff)
[MERGE] forward port branch 11.0 up to ca3390fd056
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/editor/rte.js13
1 files changed, 1 insertions, 12 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js
index 4d2f6fe977a..c0e2218d974 100644
--- a/addons/web_editor/static/src/js/editor/rte.js
+++ b/addons/web_editor/static/src/js/editor/rte.js
@@ -654,7 +654,7 @@ var RTEWidget = Widget.extend({
// whitespace characters (so Tripleclicking then typing text will remove
// the whole paragraph instead of its content).
// http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
- if ($.browser.chrome === true && event.originalEvent.detail === 3) {
+ if ($.browser.chrome === true && ev.originalEvent.detail === 3) {
var currentSelection = range.create();
if (currentSelection.sc.parentNode === currentSelection.ec) {
_selectSC(currentSelection);
@@ -671,17 +671,6 @@ var RTEWidget = Widget.extend({
function _selectSC(selection) {
range.create(selection.sc, selection.so, selection.sc, selection.sc.length).select();
}
-
- // To Fix Google Chrome Tripleclick Issue, which selects the ending
- // whitespace characters (so Tripleclicking then typing text will remove
- // the whole paragraph instead of its content).
- // http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
- if ($.browser.chrome === true && ev.originalEvent.detail === 3) {
- var currentSelection = range.create();
- if (currentSelection.sc.parentNode === currentSelection.ec) {
- range.create(currentSelection.sc, currentSelection.so, currentSelection.sc, currentSelection.sc.length).select();
- }
- }
},
});