summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/content/menu.js
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2019-12-18 11:36:59 +0000
committerqsm-odoo <qsm@odoo.com>2020-01-30 16:55:31 +0000
commit8d3d32ec4490cf72b4057cbd91247e5cc8e174be (patch)
tree6c9ad782cd509b64d6b7823fa6113144d25c28cf /addons/website/static/src/js/content/menu.js
parentf61b4669a9607c3cb800d5ec33ab0001086f2d97 (diff)
[IMP] website: set anchor offset by fixed header height
When you click on an anchor link, this commit ensures that the scroll is in the correct place if there are fixed menus on the page. Part of https://github.com/odoo/odoo/pull/40690 task-1894456
Diffstat (limited to 'addons/website/static/src/js/content/menu.js')
-rw-r--r--addons/website/static/src/js/content/menu.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/js/content/menu.js b/addons/website/static/src/js/content/menu.js
index 1b6fa07a5c0..0f70408fc47 100644
--- a/addons/website/static/src/js/content/menu.js
+++ b/addons/website/static/src/js/content/menu.js
@@ -15,7 +15,7 @@ publicWidget.registry.affixMenu = publicWidget.Widget.extend({
var def = this._super.apply(this, arguments);
var self = this;
- this.$headerClone = this.$target.clone().addClass('o_header_affix affix').removeClass('o_affix_enabled').removeAttr('id');
+ this.$headerClone = this.$target.clone().addClass('o_header_affix affix o_top_fixed_element').removeClass('o_affix_enabled').removeAttr('id');
this.$headerClone.insertAfter(this.$target);
this.$headers = this.$target.add(this.$headerClone);
this.$dropdowns = this.$headers.find('.dropdown');