summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-09-17 12:21:49 +0200
committerAlexandre Kühn <aku@odoo.com>2018-09-17 16:46:53 +0200
commit81bce622bce4f426b9bff3477ba922ec9bb3e837 (patch)
tree3f2e05823e1bff61dbdc9b747fc4bed3acdcd052
parent38c7ed3c73eb5efc370c6ac0050e38ca8810e59e (diff)
[FIX] web_tour: place tooltip above dropdown-menu
Before this commit, a tip on a dropdown menu item was visible. This is due to the positioning of the tip, which was on the dropdown-menu (because it has overflow `auto`). The tip was appended on the dropdown-menu, and may overflow as a result. This commit handles specifically the case of dropdown-menu, so that dropdown-menu is never a candidate for the placement of the tip.
-rw-r--r--addons/web_tour/static/src/js/tip.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js
index 33f20ee7496..598cd8a0679 100644
--- a/addons/web_tour/static/src/js/tip.js
+++ b/addons/web_tour/static/src/js/tip.js
@@ -132,7 +132,14 @@ var Tip = Widget.extend({
$location = $location.parent();
o = $location.css("overflow");
p = $location.css("position");
- } while ((o === "visible" || o === "hidden") && p !== "fixed" && $location[0].tagName.toUpperCase() !== 'BODY');
+ } while (
+ $location.hasClass('dropdown-menu') ||
+ (
+ (o === "visible" || o === "hidden") &&
+ p !== "fixed" &&
+ $location[0].tagName.toUpperCase() !== 'BODY'
+ )
+ );
return $location;
},