Tweak of the RoomTooltip to use DOM element for the parent rather than a React component
This commit is contained in:
parent
4c05edb71b
commit
bffefd9261
1 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
|
var ReactDOM = require("react-dom");
|
||||||
var classNames = require('classnames');
|
var classNames = require('classnames');
|
||||||
var dis = require("../../../dispatcher");
|
var dis = require("../../../dispatcher");
|
||||||
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
||||||
|
@ -75,6 +76,10 @@ module.exports = React.createClass({
|
||||||
MatrixClientPeg.get().on("accountData", this.onAccountData);
|
MatrixClientPeg.get().on("accountData", this.onAccountData);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentDidMount: function() {
|
||||||
|
this.componentElement = ReactDOM.findDOMNode(this);
|
||||||
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
if (cli) {
|
if (cli) {
|
||||||
|
@ -248,7 +253,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
else if (this.state.hover) {
|
else if (this.state.hover) {
|
||||||
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
|
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;
|
var incomingCallBox;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue