summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.contentMenu.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-11-04 13:39:35 +0000
committerqsm-odoo <qsm@odoo.com>2019-11-06 12:26:27 +0000
commitc83eb1bd44fc166f5360228edeec429d27c03d44 (patch)
treee9aa32c520e2b2a8c5599e3acab240e331ab20ca /addons/website/static/src/xml/website.contentMenu.xml
parent958c850f9f6ce722b0938331d0df9f873645f467 (diff)
[FIX] website: avoid flickering when switching slide in editor
Before this commit, when an user clicked on a control button to go to another carousel slide, the overlay ended at the wrong position and multiple scrollbars appeared. This occured because bootstrap fires the 'slid.bs.carousel' event too soon, because it emulates the transition end event with a setTimeout. So on a normal computer, this occured: - User click on control button, transition starts. - slid.bs.carousel is fired -> we retarget the edition to the new active slide and reposition the overlay... but that slide is still moving as the transition is not really finished. - The transition finishes, the overlay is at the wrong position, outside of the screen. Actually, this is more complex than than because our own system checks transition end events to reposition the overlay. Even if unperfect, we now have: - User click on control button, transition starts. - slide.bs.carousel is fired -> we enable the parent carousel instead of the current slide (this DOM element is not moving). - slid.bs.carousel is fired -> we know it is fired too soon, so we wait an extra 20% of the time between 'slide' and 'slid' before retargeting edition. - The transition finishes, the overlay is still over the carousel and not the active slide. - Our extra 20% duration ends, we retarget edition to the current slide and reposition the overlay (should not move since normally at the same position as the carousel itself). Part of https://github.com/odoo/odoo/pull/38997 task-2090180
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
0 files changed, 0 insertions, 0 deletions