Skip to content

Commit 39aaf1e

Browse files
committed
disable contextmenu
1 parent dbee0f5 commit 39aaf1e

File tree

1 file changed

+6
-5
lines changed
  • services/app/apps/codebattle/assets/js/widgets/utils

1 file changed

+6
-5
lines changed

services/app/apps/codebattle/assets/js/widgets/utils/useEditor.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-bitwise */
22
import {
3-
useState, useEffect, useCallback, useMemo,
3+
useState, useEffect, useCallback, useMemo,
44
} from 'react';
55

66
import GameRoomModes from '../config/gameModes';
@@ -64,7 +64,8 @@ const useOption = (
6464
enabled: false,
6565
},
6666
readOnly: !editable || loading,
67-
contextmenu: editable && !loading,
67+
// contextmenu: editable && !loading,
68+
contextmenu: false,
6869
scrollbar: {
6970
useShadows: false,
7071
verticalHasArrows: true,
@@ -148,15 +149,15 @@ const useEditor = props => {
148149
// model.forceTokenization(model.getLineCount());
149150
// }
150151

151-
const handleEditorWillMount = () => {};
152+
const handleEditorWillMount = () => { };
152153

153154
const handleEditorDidMount = (currentEditor, currentMonaco) => {
154155
setEditor(currentEditor);
155156
setMonaco(currentMonaco);
156157

157158
const {
158-
editable, roomMode, checkResult, toggleMuteSound,
159-
} = props;
159+
editable, roomMode, checkResult, toggleMuteSound,
160+
} = props;
160161

161162
// Handle copy event
162163
// editor.onDidCopyText(event => {

0 commit comments

Comments
 (0)