From bf5c90d0be7808a08ad8b1b676bcd698181e1d7b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 24 Jan 2018 13:13:22 +0100 Subject: [PATCH] [FIX] web_editor: strange horizontal scroll on mousedown Before this commit, when pressing the mouse button on the end of the ace editor, it scrolled to the right, selecting the whole sentence end. This strange behavior was due to some initialization mistake made by commit https://github.com/odoo/odoo/commit/5a030db3eb77b6d80187f8ae1a64303b2f50391d --- addons/web_editor/static/src/js/ace.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/js/ace.js b/addons/web_editor/static/src/js/ace.js index b33b3c479be..7629d1465c8 100644 --- a/addons/web_editor/static/src/js/ace.js +++ b/addons/web_editor/static/src/js/ace.js @@ -107,12 +107,11 @@ var ViewEditor = Widget.extend({ */ start: function () { this.$viewEditor = this.$('#ace-view-editor'); - this.$editor = this.$(".ace_editor"); this.$viewList = this.$('#ace-view-list'); this.$viewID = this.$('#ace-view-id'); - this.aceEditor = window.ace.edit(this.$viewEditor[0]); this.aceEditor.setTheme("ace/theme/monokai"); + this.$editor = this.$(".ace_editor"); var refX = 0; var resizing = false;