diff options
| author | Mohammed Shekha <msh@odoo.com> | 2020-12-31 06:13:03 +0000 |
|---|---|---|
| committer | Mohammed Shekha <msh@odoo.com> | 2021-02-15 18:45:54 +0000 |
| commit | eb31687b5c5733534634ae13448db3fb466f725d (patch) | |
| tree | cc19e65b23b6db3e68364b52cf4a52057aeabb89 /addons/web/static/src/js/chrome | |
| parent | 24804aaef12fd98bc63fdb0e7905500ac76f877a (diff) | |
[FIX] web: fix horizontal scroll position not preserved
before this commit: when there is a horizontal scroll in view say for example
kanban view where there are too many columns and user scrolls horizontally and
go to form view by clicking on any record and then come back to kanban view
horizontal scroll is not preserved and user is moved to scroll position 0
this is due to commit: https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242
after this commit: scrolling horizontally and then go to form view and come
back to previous view will preserve scroll position, we also consider case for
kanban view where there are too many columns and user click on 'Add Column'
user will be scrolled to new column element.
task-2418275
closes odoo/odoo#66218
X-original-commit: 171036aefe21799f7a791cc3cd73a7d249aa0b00
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/chrome')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 34b033b8c3d..032b8706bc5 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -485,7 +485,7 @@ var AbstractWebClient = Widget.extend(KeyboardNavigationMixin, { return; } var offset = {top: ev.data.top, left: ev.data.left || 0}; - if (!offset.top) { + if (ev.data.selector) { offset = dom.getPosition(document.querySelector(ev.data.selector)); // Substract the position of the scrolling element offset.top -= dom.getPosition(scrollingEl).top; |
