-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where dialogue / math expression autocomplete menu could ap…
…pear behind other UI elements
- Loading branch information
1 parent
699ea5e
commit 439adbf
Showing
4 changed files
with
53 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { FC } from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
export const portalRoot: HTMLElement = document.getElementById( | ||
"MenuPortal" | ||
) as HTMLElement; | ||
|
||
export const Portal: FC = (props) => { | ||
const root: HTMLElement = document.getElementById( | ||
"MenuPortal" | ||
) as HTMLElement; | ||
return ReactDOM.createPortal(props.children, root); | ||
return ReactDOM.createPortal(props.children, portalRoot); | ||
}; |