summaryrefslogtreecommitdiff
path: root/doc/reference/javascript.rst
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-06-23 14:42:37 +0200
committerqsm-odoo <qsm@odoo.com>2016-06-24 17:18:44 +0200
commitb70c990b6a9b1f082399a25bc8440aaccb060f64 (patch)
treeea7ddde3cde9053362aa66c0ede377e9b0d7a73e /doc/reference/javascript.rst
parent25a3a6f9bf00f8b2232fff42944098e9c7705696 (diff)
[IMP] web_tour: tip location
Choosing where to place a tip is a difficult problem. If placed in the body element, the tip have to be repositionned on each scroll event which is performance-consuming and induces bugs (firefox scroll event, tips which is over an element while the anchor is under, ...). If placed in the anchor parent which scrolls, all the above problems are solved but when the tip opens it cannot overflow its parent boundaries, which is not possible in many contexts (modals, ...). The solution here is to change the tip location when it opens/closes. When closed, it is placed in the anchor parent which scrolls. This allows to not have to reposition the tip on each scroll. The tip is also naturally hidden when its anchor is not visible on the screen. When opened, the tip is placed in the body, where it can be placed on the top of anything in the DOM. The transition from one state to another is not noticable as the position does not have to be computed when the tip is moved in the DOM and the animation is purely CSS. Note: however, this commit does not solve the firefox bug of closing the tip when the window scrolls. Here, the temporary solution is to let the tip be wrongly position if the user scrolls when a tip is opened (this only occurs when using the mouse wheel anyway).
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions