This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
apps/client/src/widgets/type_widgets Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
8080
8181 show ( ) {
8282 this . $widget . show ( ) ;
83+ this . #updateBackgroundColor( ) ;
8384 }
8485
8586 focus ( ) {
@@ -97,6 +98,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
9798 this . codeEditor . setText ( "" ) ;
9899 } ) ;
99100 }
101+ this . #updateBackgroundColor( "unset" ) ;
100102 }
101103
102104 async executeWithCodeEditorEvent ( { resolve, ntxId } : EventData < "executeWithCodeEditor" > ) {
@@ -117,6 +119,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
117119 if ( theme ) {
118120 await this . codeEditor . setTheme ( theme ) ;
119121 }
122+ this . #updateBackgroundColor( ) ;
120123 }
121124 }
122125
@@ -125,4 +128,9 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
125128 }
126129 }
127130
131+ #updateBackgroundColor( color ?: string ) {
132+ const $editorEl = $ ( this . codeEditor . dom ) ;
133+ this . $widget . closest ( ".scrolling-container" ) . css ( "background-color" , color ?? $editorEl . css ( "background-color" ) ) ;
134+ }
135+
128136}
You can’t perform that action at this time.
0 commit comments