correct use of reference
This commit is contained in:
@@ -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()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user