From 0dda3c312d4ae867c92a61984631ae4d3c38a85d Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Wed, 18 Oct 2017 19:08:56 +0000 Subject: [PATCH] [MD settings] fix tooltips on policy icons This CL changes the relative position for tooltips vs the trigger for the tooltip so that the tooltip shows up reliably. Bug: 774046 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I78f8fd6b95992a2c4e3f1a1d7b1ff43a969a4654 Reviewed-on: https://chromium-review.googlesource.com/719581 Reviewed-by: Steven Bennetts Commit-Queue: Dave Schuyler Cr-Original-Commit-Position: refs/heads/master@{#509188}(cherry picked from commit 5f889022f1e61bace2efa5d54f6da3cae0402ad2) Reviewed-on: https://chromium-review.googlesource.com/726400 Reviewed-by: Dave Schuyler Cr-Commit-Position: refs/branch-heads/3239@{#56} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} --- chrome/browser/resources/settings/search_settings.js | 2 +- ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html | 1 - ui/webui/resources/cr_elements/shared_vars_css.html | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/browser/resources/settings/search_settings.js b/chrome/browser/resources/settings/search_settings.js index c42fe34215a1..b05aa1106f43 100644 --- a/chrome/browser/resources/settings/search_settings.js +++ b/chrome/browser/resources/settings/search_settings.js @@ -213,7 +213,7 @@ cr.define('settings', function() { // Dynamically position the bubble at the edge the associated control // element. var updatePosition = function() { - searchBubble.style.top = + searchBubble.style.top = element.offsetTop + (innards.classList.contains('above') ? -searchBubble.offsetHeight : element.offsetHeight) + 'px'; diff --git a/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html b/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html index cd4e8274fabf..0cc016ffa392 100644 --- a/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html +++ b/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html @@ -24,7 +24,6 @@ min-height: var(--cr-section-min-height); outline: none; padding: 0 var(--cr-section-padding); - position: relative; } :host([disabled]) { diff --git a/ui/webui/resources/cr_elements/shared_vars_css.html b/ui/webui/resources/cr_elements/shared_vars_css.html index c2f74961c04e..d6f0ad99d512 100644 --- a/ui/webui/resources/cr_elements/shared_vars_css.html +++ b/ui/webui/resources/cr_elements/shared_vars_css.html @@ -65,7 +65,6 @@ display: flex; min-height: var(--cr-section-min-height); padding: 0 var(--cr-section-padding); - position: relative; }; --cr-title-text: {