Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 11e8be4

Browse files
author
Yuncong Zhang
authored
Merge pull request #344 from UnityTech/fix_raster_cache_assert
fix editable bug
2 parents 0fb50e8 + cbb9d9c commit 11e8be4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Runtime/rendering/editable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,7 @@ void _paintContents(PaintingContext context, Offset offset) {
15271527
else if (!this._selection.isCollapsed && this._selectionColor != null) {
15281528
showSelection = true;
15291529
}
1530+
this._updateSelectionExtentsVisibility(effectiveOffset);
15301531
}
15311532

15321533
if (showSelection) {

Runtime/widgets/text_selection.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Unity.UIWidgets.scheduler;
99
using Unity.UIWidgets.service;
1010
using Unity.UIWidgets.ui;
11+
using Rect = Unity.UIWidgets.ui.Rect;
1112

1213
namespace Unity.UIWidgets.widgets {
1314
static class TextSelectionUtils {
@@ -96,10 +97,10 @@ public void handlePaste(TextSelectionDelegate selectionDelegate) {
9697
offset: value.selection.start + data.text.Length
9798
)
9899
);
100+
101+
selectionDelegate.bringIntoView(selectionDelegate.textEditingValue.selection.extendPos);
102+
selectionDelegate.hideToolbar();
99103
}
100-
101-
selectionDelegate.bringIntoView(selectionDelegate.textEditingValue.selection.extendPos);
102-
selectionDelegate.hideToolbar();
103104
});
104105
}
105106

0 commit comments

Comments
 (0)