mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Ensure context menus are positioned relative to top of page
This commit is contained in:
parent
17ecf5b0b6
commit
b92935fa9f
1 changed files with 4 additions and 2 deletions
|
|
@ -6,9 +6,11 @@ import classnames from "classnames";
|
|||
import "../../css/context-menu.css";
|
||||
|
||||
class Portal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
componentWillMount() {
|
||||
this._node = document.createElement("div");
|
||||
this._node.style.position = "absolute";
|
||||
this._node.style.top = 0;
|
||||
this._node.style.left = 0;
|
||||
document.body.appendChild(this._node);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue