@@ -83,9 +83,6 @@ export abstract class Field<T = any>
8383 */
8484 DEFAULT_VALUE : T | null = null ;
8585
86- /** Non-breaking space. */
87- static readonly NBSP = '\u00A0' ;
88-
8986 /**
9087 * A value used to signal when a field's constructor should *not* set the
9188 * field's value or run configure_, and should allow a subclass to do that
@@ -905,17 +902,6 @@ export abstract class Field<T = any>
905902 if ( this . isDirty_ ) {
906903 this . render_ ( ) ;
907904 this . isDirty_ = false ;
908- } else if ( this . visible_ && this . size_ . width === 0 ) {
909- // If the field is not visible the width will be 0 as well, one of the
910- // problems with the old system.
911- this . render_ ( ) ;
912- // Don't issue a warning if the field is actually zero width.
913- if ( this . size_ . width !== 0 ) {
914- console . warn (
915- 'Deprecated use of setting size_.width to 0 to rerender a' +
916- ' field. Set field.isDirty_ to true instead.' ,
917- ) ;
918- }
919905 }
920906 return this . size_ ;
921907 }
@@ -979,16 +965,10 @@ export abstract class Field<T = any>
979965 */
980966 protected getDisplayText_ ( ) : string {
981967 let text = this . getText ( ) ;
982- if ( ! text ) {
983- // Prevent the field from disappearing if empty.
984- return Field . NBSP ;
985- }
986968 if ( text . length > this . maxDisplayLength ) {
987969 // Truncate displayed string and add an ellipsis ('...').
988970 text = text . substring ( 0 , this . maxDisplayLength - 2 ) + '…' ;
989971 }
990- // Replace whitespace with non-breaking spaces so the text doesn't collapse.
991- text = text . replace ( / \s / g, Field . NBSP ) ;
992972 if ( this . sourceBlock_ && this . sourceBlock_ . RTL ) {
993973 // The SVG is LTR, force text to be RTL by adding an RLM.
994974 text += '\u200F' ;
0 commit comments