summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/tools
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2018-12-26 11:11:41 +0000
committerSébastien Theys <seb@odoo.com>2018-12-26 11:12:16 +0000
commitff873626ed747b2f3c246323f99cde213f3e983a (patch)
treefeb00a859f26080d6e807844164922243f8f6dfb /addons/web/static/src/js/tools
parent20478ff12ec5149e5281bbc00e78395db8fa891b (diff)
[FIX] website_sale_wishlist: prevent flicker and make tour deterministic
Before this commit, there was a slight chance that the "add to wishlist" button would flicker `disabled` off, which caused the tour to go next step too early. The flicker was because the `_onChangeVariant` could be triggered by the `website_sale` code before the variable `this.wishlistProductIDs` was actually set, so it wrongly computed the state and enabled the button. Now the RPC is done on the `willStart` instead of `start` to solve this issue. The tour has been edited to check the button is actually disabled initially. The view has been edited because the existing condition was too lazy: it checked if any variant of the current template was in the wishlist, instead of checking for the variant actually displayed. That also caused a flicker when the JS correctly computed the state for the variant afterwards. The widget has also been edited to trigger `input.product_id` instead of `input.js_variant_change:checked` to avoid calling `get_combination_info` twice from `website_sale` code. PR: #29675 task-1920036
Diffstat (limited to 'addons/web/static/src/js/tools')
0 files changed, 0 insertions, 0 deletions