File tree 1 file changed +8
-2
lines changed
src/components/contextview
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 8
8
IPosition ,
9
9
} from 'mo/common/dom' ;
10
10
import './style.scss' ;
11
+ import { Utils } from 'dt-utils/lib' ;
11
12
12
13
export interface IContextViewProps {
13
14
render ?: ( ) => React . ReactNode ;
@@ -60,9 +61,14 @@ export function useContextView(props?: IContextViewProps): IContextView {
60
61
61
62
if ( ! contextView ) {
62
63
contextView = document . createElement ( 'div' ) ;
63
- contextView . className = claName ;
64
+ contextView . className = classNames ( claName , Utils . isMacOs ( ) ? 'mac' : null ) ;
64
65
contextView . style . display = 'none' ;
65
- document . body . appendChild ( contextView ) ;
66
+ const root = document . getElementById ( 'molecule' ) ;
67
+ if ( ! root ) {
68
+ document . body . appendChild ( contextView ) ;
69
+ } else {
70
+ root . appendChild ( contextView ) ;
71
+ }
66
72
67
73
ReactDOM . render (
68
74
< >
You can’t perform that action at this time.
0 commit comments