fix: super weird bug with placeholders (#1159)
This commit is contained in:
parent
f125330265
commit
1c2d58b65a
1 changed files with 5 additions and 11 deletions
|
|
@ -388,9 +388,7 @@ class _AppFlowyRichTextState extends State<AppFlowyRichText>
|
|||
textSpan = adjustTextSpan(textSpan);
|
||||
final delta = widget.node.delta;
|
||||
if (delta != null && delta.isNotEmpty) {
|
||||
textSpan = textSpan.updateTextStyle(
|
||||
const TextStyle(color: Colors.transparent),
|
||||
);
|
||||
textSpan = textSpan.copyWith(text: '');
|
||||
}
|
||||
return RichText(
|
||||
key: placeholderTextKey,
|
||||
|
|
@ -543,14 +541,10 @@ class _AppFlowyRichTextState extends State<AppFlowyRichText>
|
|||
|
||||
TextSpan getPlaceholderTextSpan() {
|
||||
return TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: widget.placeholderText,
|
||||
style: textStyleConfiguration.text.copyWith(
|
||||
height: textStyleConfiguration.lineHeight,
|
||||
),
|
||||
),
|
||||
],
|
||||
text: widget.placeholderText,
|
||||
style: textStyleConfiguration.text.copyWith(
|
||||
height: textStyleConfiguration.lineHeight,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue