Tweak of the RoomTooltip to use DOM element for the parent rather than a React component
parent
4c05edb71b
commit
bffefd9261
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var ReactDOM = require("react-dom");
|
||||
var classNames = require('classnames');
|
||||
var dis = require("../../../dispatcher");
|
||||
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
||||
|
@ -75,6 +76,10 @@ module.exports = React.createClass({
|
|||
MatrixClientPeg.get().on("accountData", this.onAccountData);
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
this.componentElement = ReactDOM.findDOMNode(this);
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
var cli = MatrixClientPeg.get();
|
||||
if (cli) {
|
||||
|
@ -248,7 +253,7 @@ module.exports = React.createClass({
|
|||
}
|
||||
else if (this.state.hover) {
|
||||
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
|
||||
label = <RoomTooltip room={this.props.room} component={this} />;
|
||||
label = <RoomTooltip room={this.props.room} parent={this.componentElement} />;
|
||||
}
|
||||
|
||||
var incomingCallBox;
|
||||
|
|
Loading…
Reference in New Issue