From 26f251b497fa6f52625d105ad174d4e0a9a20e61 Mon Sep 17 00:00:00 2001 From: julakali Date: Sat, 16 May 2020 02:10:40 +0200 Subject: [PATCH] Don't use body as tooltip container, allow notification area overflow (#2166) * Don't use body as tooltip container, allow notification area overflow Badge tooltips are using container: 'body', so they can overflow the notification area. When the user navigates back while a badge tooltip is showing, the tooltip remains visible. This commit removes the body container attribute and instead allows the notificationDropDown to overflow, so badge tooltips aren't cut off. Instead, this adds overflow: hidden to NotificationList. Fixes #2118. * Remove newline --- framework/core/js/src/common/components/Badge.js | 2 +- framework/core/less/forum/NotificationList.less | 1 + framework/core/less/forum/NotificationsDropdown.less | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/js/src/common/components/Badge.js b/framework/core/js/src/common/components/Badge.js index 9e73e584d..58c5e9697 100644 --- a/framework/core/js/src/common/components/Badge.js +++ b/framework/core/js/src/common/components/Badge.js @@ -30,6 +30,6 @@ export default class Badge extends Component { config(isInitialized) { if (isInitialized) return; - if (this.props.label) this.$().tooltip({ container: 'body' }); + if (this.props.label) this.$().tooltip(); } } diff --git a/framework/core/less/forum/NotificationList.less b/framework/core/less/forum/NotificationList.less index 317923fc8..4b4ee2e77 100644 --- a/framework/core/less/forum/NotificationList.less +++ b/framework/core/less/forum/NotificationList.less @@ -1,5 +1,6 @@ .NotificationList { + overflow: hidden; & .loading-indicator { height: 100px; } diff --git a/framework/core/less/forum/NotificationsDropdown.less b/framework/core/less/forum/NotificationsDropdown.less index 8d1307a12..3d3564e11 100644 --- a/framework/core/less/forum/NotificationsDropdown.less +++ b/framework/core/less/forum/NotificationsDropdown.less @@ -1,7 +1,6 @@ .NotificationsDropdown { .Dropdown-menu { padding: 0; - overflow: hidden; .NotificationList-content { max-height: 70vh;