Skip to content

Commit ece59ed

Browse files
committed
Fixed no underline displayed for characters being converted with IME within a hasEmbed line on iOS
1 parent 48f6b70 commit ece59ed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/src/document/nodes/node.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ abstract base class Node extends LinkedListEntry<Node> {
5151

5252
Node clone() => newInstance()..applyStyle(style);
5353

54+
Node cloneWithOffset() => clone()..parent = parent.._offset = offset;
55+
5456
int? _offset;
5557

5658
/// Offset in characters of this node relative to [parent] node.

lib/src/editor/widgets/text/text_line.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class _TextLineState extends State<TextLine> {
251251
}
252252

253253
// here child is Text node and its value is cloned
254-
textNodes.add(child.clone());
254+
textNodes.add(child.cloneWithOffset());
255255
}
256256

257257
if (textNodes.isNotEmpty) {

0 commit comments

Comments
 (0)