diff options
author | sarahghp <sarah.groff.palermo@gmail.com> | 2019-03-25 13:41:10 -0400 |
---|---|---|
committer | sarahghp <sarah.groff.palermo@gmail.com> | 2019-03-25 13:41:10 -0400 |
commit | 377dbe19b3fa4ccfe0d0aee5445071a741b57518 (patch) | |
tree | 170abe9b9b6db9874eca02de3cf396996c1b4f8a | |
parent | f1168d563ed25cc563a2cfa72fbfa7f4c852f53c (diff) | |
download | gitlab-ce-58712-tooltip-comp-fix.tar.gz |
Add test to work with inline-block elements58712-tooltip-comp-fix
-rw-r--r-- | app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue | 6 |
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; } }, |