File tree Expand file tree Collapse file tree
plugins/field-multilineinput/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
165165 let textLines = this . getText ( ) ;
166166 if ( ! textLines ) {
167167 // Prevent the field from disappearing if empty.
168- return Blockly . Field . NBSP ;
168+ // TODO(google/blockly#8738): Use Blockly.Field.NBSP if it is restored.
169+ return '\u00A0' ; // Non-breaking space.
169170 }
170171 const lines = textLines . split ( '\n' ) ;
171172 textLines = '' ;
@@ -182,7 +183,8 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
182183 }
183184 // Replace whitespace with non-breaking spaces so the text doesn't
184185 // collapse.
185- text = text . replace ( / \s / g, Blockly . Field . NBSP ) ;
186+ // TODO(google/blockly#8738): Use Blockly.Field.NBSP if it is restored.
187+ text = text . replace ( / \s / g, '\u00A0' ) ; // Non-breaking space.
186188
187189 textLines += text ;
188190 if ( i !== displayLinesNumber - 1 ) {
You can’t perform that action at this time.
0 commit comments