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);
|
textSpan = adjustTextSpan(textSpan);
|
||||||
final delta = widget.node.delta;
|
final delta = widget.node.delta;
|
||||||
if (delta != null && delta.isNotEmpty) {
|
if (delta != null && delta.isNotEmpty) {
|
||||||
textSpan = textSpan.updateTextStyle(
|
textSpan = textSpan.copyWith(text: '');
|
||||||
const TextStyle(color: Colors.transparent),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return RichText(
|
return RichText(
|
||||||
key: placeholderTextKey,
|
key: placeholderTextKey,
|
||||||
|
|
@ -543,14 +541,10 @@ class _AppFlowyRichTextState extends State<AppFlowyRichText>
|
||||||
|
|
||||||
TextSpan getPlaceholderTextSpan() {
|
TextSpan getPlaceholderTextSpan() {
|
||||||
return TextSpan(
|
return TextSpan(
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: widget.placeholderText,
|
text: widget.placeholderText,
|
||||||
style: textStyleConfiguration.text.copyWith(
|
style: textStyleConfiguration.text.copyWith(
|
||||||
height: textStyleConfiguration.lineHeight,
|
height: textStyleConfiguration.lineHeight,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue