File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
src/components/YamlEditor Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -103,27 +103,6 @@ export const YamlEditor = (props: YamlEditorProps) => {
103103 [ isEdit , onChange ] ,
104104 ) ;
105105
106- // Stop key events from bubbling to parent components (e.g., UI5 toolbars) which may intercept Space
107- const handleEditorMount = useCallback (
108- ( editorInstance : monaco . editor . IStandaloneCodeEditor , monacoApi : typeof monaco ) => {
109- const stopIfSpace = ( ev : monaco . IKeyboardEvent ) => {
110- const be = ev . browserEvent as KeyboardEvent ;
111- const isSpace = be . code === 'Space' || be . key === ' ' || be . key === 'Spacebar' ;
112- if ( isSpace ) be . stopPropagation ( ) ;
113- } ;
114-
115- editorInstance . onKeyDown ( stopIfSpace ) ;
116- editorInstance . onKeyUp ( stopIfSpace ) ;
117-
118- // Call parent onMount with strong types, avoid any casts
119- const typedParentOnMount = parentOnMount as
120- | ( ( editor : monaco . editor . IStandaloneCodeEditor , monacoNs : typeof monaco ) => void )
121- | undefined ;
122- typedParentOnMount ?.( editorInstance , monacoApi ) ;
123- } ,
124- [ parentOnMount ] ,
125- ) ;
126-
127106 const handleApply = useCallback ( ( ) => {
128107 const run = async ( ) => {
129108 setApplyAttempted ( true ) ;
@@ -174,7 +153,6 @@ export const YamlEditor = (props: YamlEditorProps) => {
174153 height = "100%"
175154 language = "yaml"
176155 onChange = { handleEditorChange }
177- onMount = { handleEditorMount }
178156 />
179157 </ div >
180158 { showValidationErrors && (
You can’t perform that action at this time.
0 commit comments