summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/web_client.js
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-10-01 07:42:45 +0000
committerfw-bot <otis@odoo.com>2019-10-21 12:26:12 +0000
commit52f67d87d16662970aad9ac46a88bd045eafae82 (patch)
treefc3d497245dc9ba47666db1d6197c39a75013af4 /addons/web/static/src/js/chrome/web_client.js
parent3a7bb6aefdeedd8745187f3d71efbf2abf891d6e (diff)
[FIX] web: web_client o_content is scrollable, not action manager
Go on a kanban view with a scroll bar scroll all the way down Open a record in form view Use the breadcrumb to go back to the kanban Before this commit, the kanban was re-opened but the position were we were before opening the record was lost This was due to 40dd121938552d3f88289d2e5fcd1d57a0dd01bb which refactors the dom, puting the action manager on top of controllers After this commit, when re-opening the kanban, we end up at the same position we left it at OPW 2074077 closes odoo/odoo#39120 X-original-commit: c0d48878c452b256859f067186567c126d8de27e Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/chrome/web_client.js')
-rw-r--r--addons/web/static/src/js/chrome/web_client.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/addons/web/static/src/js/chrome/web_client.js b/addons/web/static/src/js/chrome/web_client.js
index e79f7d84289..e12f22fcf05 100644
--- a/addons/web/static/src/js/chrome/web_client.js
+++ b/addons/web/static/src/js/chrome/web_client.js
@@ -238,49 +238,6 @@ return AbstractWebClient.extend({
_openMenu: function (action, options) {
return this.do_action(action, options);
},
-
- //--------------------------------------------------------------------------
- // Public
- //--------------------------------------------------------------------------
-
- /**
- * Returns the left and top scroll positions of the main scrolling area
- * (i.e. the action manager in desktop).
- *
- * @returns {Object} with keys left and top
- */
- getScrollPosition: function () {
- return {
- left: this.action_manager.el.scrollLeft,
- top: this.action_manager.el.scrollTop,
- };
- },
-
- //--------------------------------------------------------------------------
- // Handlers
- //--------------------------------------------------------------------------
-
- /**
- * @override
- * @private
- */
- _onGetScrollPosition: function (ev) {
- ev.data.callback(this.getScrollPosition());
- },
- /**
- * @override
- * @private
- */
- _onScrollTo: function (ev) {
- var offset = {top: ev.data.top, left: ev.data.left || 0};
- if (!offset.top) {
- offset = dom.getPosition(document.querySelector(ev.data.selector));
- // Substract the position of the action_manager as it is the scrolling part
- offset.top -= dom.getPosition(this.action_manager.el).top;
- }
- this.action_manager.el.scrollTop = offset.top;
- this.action_manager.el.scrollLeft = offset.left;
- },
});
});