[FIX] website: keep track of throttled scroll event target for Chrome
In Chrome, if a scroll event is not brand new, its `currentTarget` is lost. This commit makes sure that the `currentTarget` of the throttled scroll event sent to `_onScrollWebsiteAnimate` is kept separately to avoid the issue in case of throttling delay. task-3449843 closes odoo/odoo#161850 X-original-commit: 277e9f292a031ed835f4135e597c17dab2fd067d Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
This commit is contained in:
@@ -1604,7 +1604,8 @@ registry.WebsiteAnimate = publicWidget.Widget.extend({
|
||||
* @param {Event} ev
|
||||
*/
|
||||
_onScrollWebsiteAnimate(ev) {
|
||||
this._scrollWebsiteAnimate(ev.currentTarget);
|
||||
// Note: Do not rely on ev.currentTarget which might be lost by Chrome.
|
||||
this._scrollWebsiteAnimate(this.$scrollingElement[0]);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user