mirror of https://github.com/zulip/zulip.git
tooltips: Fix offscreen tooltips taking scroll space.
This commit is contained in:
parent
95f8b3a618
commit
54fae321aa
|
@ -87,4 +87,20 @@
|
|||
text-align: center;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
/* If the reference of the tooltip is went offscreen while scrolling,
|
||||
the tooltip will be visible until the scrolling stops. Popper adds
|
||||
`data-reference-hidden` attribute to those tooltips whole reference is
|
||||
hidden. Since tooltips have `absolute` position, they can occupy scroll
|
||||
space offscreen and cause document to have the wrong scroll height.
|
||||
Setting `display: none` makes sure it doesn't occupy any offscreen space.
|
||||
|
||||
NOTE: This data attribtute has changed each time in the past 3 releases and
|
||||
if we upgrade tippy from v6, we should check if this attribute is still valid.
|
||||
|
||||
See https://github.com/atomiks/tippyjs/issues/555 for some discussion on this.
|
||||
*/
|
||||
[data-reference-hidden] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue