Skip to content

Commit db7da35

Browse files
committed
anchor tooltip to the trigger element in some components / fix 'bottom-right' option
1 parent 1d4c2d3 commit db7da35

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

frontend/views/components/LinkToCopy.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ component.c-wrapper(
1818
tooltip.c-feedback(
1919
v-if='ephemeral.isTooltipActive'
2020
:isVisible='true'
21+
:anchorToElement='true'
2122
direction='top'
2223
:text='L("Copied to clipboard!")'
2324
)
@@ -100,7 +101,7 @@ export default ({
100101
}
101102
102103
.c-feedback {
103-
position: absolute;
104+
position: absolute !important;
104105
left: 50%;
105106
transform: translateX(-50%);
106107
}

frontend/views/components/Tooltip.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default ({
164164
case 'right':
165165
x = `${spacing}px`
166166
y = '-50%'
167-
absPosition = { top: '50%', left: `100%` }
167+
absPosition = { top: '50%', left: '100%' }
168168
break
169169
case 'left':
170170
x = '-100%'
@@ -177,9 +177,9 @@ export default ({
177177
absPosition = { bottom: `-${spacing}px` }
178178
break
179179
case 'bottom-right':
180-
x = 0
180+
x = '-100%'
181181
y = '100%'
182-
absPosition = { bottom: `-${spacing}px`, right: 0 }
182+
absPosition = { bottom: `-${spacing}px`, left: '100%' }
183183
break
184184
case 'top':
185185
x = '-50%'

0 commit comments

Comments
 (0)