Fix SelectionArea select-word edge cases (#136920)
This change fixes issues with screen order comparison logic when rects are encompassed within each other. This was causing issues when trying to select text that includes inline `WidgetSpan`s inside of a `SelectionArea`. * Adds `boundingBoxes` to `Selectable` for a more precise hit testing region. Fixes #132821 Fixes updating selection edge by word boundary when widget spans are involved. Fixes crash when sending select word selection event to an unselectable element.
This commit is contained in:
@@ -115,6 +115,9 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
|
||||
|
||||
// Selectable APIs.
|
||||
|
||||
@override
|
||||
List<Rect> get boundingBoxes => <Rect>[paintBounds];
|
||||
|
||||
// Adjust this value to enlarge or shrink the selection highlight.
|
||||
static const double _padding = 10.0;
|
||||
Rect _getSelectionHighlightRect() {
|
||||
|
||||
Reference in New Issue
Block a user