mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Fix the ref we keep to be the react element and make velociraptor correctly track what nodes it had at the start (c.key not c.props.key)
This commit is contained in:
parent
9ec10e2b43
commit
3cf9f5248b
@ -23,7 +23,7 @@ module.exports = React.createClass({
|
||||
this.nodes = {};
|
||||
var self = this;
|
||||
React.Children.map(this.props.children, function(c) {
|
||||
self.children[c.props.key] = c;
|
||||
self.children[c.key] = c;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -70,10 +70,6 @@ module.exports = React.createClass({
|
||||
return {menu: false, allReadAvatars: false};
|
||||
},
|
||||
|
||||
componentDidUpdate: function() {
|
||||
this.readAvatarNode = ReactDom.findDOMNode(this.readAvatarNode);
|
||||
},
|
||||
|
||||
onEditClicked: function(e) {
|
||||
var MessageContextMenu = sdk.getComponent('molecules.MessageContextMenu');
|
||||
var buttonRect = e.target.getBoundingClientRect()
|
||||
@ -209,7 +205,7 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
collectReadAvatarNode: function(node) {
|
||||
this.readAvatarNode = node;
|
||||
this.readAvatarNode = ReactDom.findDOMNode(node);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user