summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue b/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue
index 69eb791d195..b977731f4f1 100644
--- a/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue
+++ b/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue
@@ -31,7 +31,11 @@ export default {
mounted() {
const target = this.selectTarget();
- if (target && target.scrollWidth > target.offsetWidth) {
+ if (
+ target &&
+ (target.scrollWidth > target.offsetWidth ||
+ target.offsetWidth > target.parentElement.offsetWidth)
+ ) {
this.showTooltip = true;
}
},