correct use of reference

This commit is contained in:
or-else
2021-07-16 14:28:13 -07:00
parent f81aaea837
commit 92f1d53e48
6 changed files with 129 additions and 131 deletions
+1 -1
View File
@@ -1350,7 +1350,7 @@ class TinodeWeb extends React.Component {
contextMenuClickAt: {x: params.x, y: params.y},
contextMenuParams: params,
contextMenuItems: menuItems || this.defaultTopicContextMenu(params.topicName),
contextMenuBounds: this.selfRef.getBoundingClientRect()
contextMenuBounds: this.selfRef.current.getBoundingClientRect()
});
}
+1 -1
View File
@@ -319,7 +319,7 @@ class ContextMenu extends React.Component {
}
handlePageClick(e) {
if (this.selfRef.contains(e.target)) {
if (this.selfRef.current.contains(e.target)) {
return;
}
e.preventDefault();