mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-30 19:01:17 +02:00
Hide tooltips with CSS when they aren't visible
Fixes https://github.com/vector-im/riot-web/issues/11456
This commit is contained in:
parent
7f7e51627c
commit
11fec80370
@ -100,7 +100,9 @@ module.exports = createReactClass({
|
|||||||
const parent = ReactDOM.findDOMNode(this).parentNode;
|
const parent = ReactDOM.findDOMNode(this).parentNode;
|
||||||
let style = {};
|
let style = {};
|
||||||
style = this._updatePosition(style);
|
style = this._updatePosition(style);
|
||||||
style.display = "block";
|
// Hide the entire container when not visible. This prevents flashing of the tooltip
|
||||||
|
// if it is not meant to be visible on first mount.
|
||||||
|
style.display = this.props.visible ? "block" : "none";
|
||||||
|
|
||||||
const tooltipClasses = classNames("mx_Tooltip", this.props.tooltipClassName, {
|
const tooltipClasses = classNames("mx_Tooltip", this.props.tooltipClassName, {
|
||||||
"mx_Tooltip_visible": this.props.visible,
|
"mx_Tooltip_visible": this.props.visible,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user