andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
74 stars 48 forks source link

StyledText.selectable with action has incorrect cursor after text selection #61

Closed mikeesouth closed 1 year ago

mikeesouth commented 1 year ago

Summary When using StyledText.selectable and selecting text, then action links does not have the correct cursor icon. The mouse cursor is correct before selecting text, but when text is selected (and even if unselected again) - the mouse cursor has an incorrect icon over the action links.

Reproduce the bug I haven't created a repro fork but the example in this repo has a SelectionArea widget around the widget so all text is selectable. If we remove that SelectionArea, no text will be selectable (as expected). If we change the action example to a "StyledText.selectable", the cursor is still correct when hovering an action link BUT if we select text the cursor is no longer correct over the action link. Even if we unselect text, the cursor is still incorrect over the action links.

Workaround At least in some cases, a workaround would be to wrap the parent element with a SelectionArea as the example already does.

andyduke commented 1 year ago

This issue is specific to Flutter's SelectableText widget.

mikeesouth commented 1 year ago

Ok, I'll close this as the workaround with SelectionArea seems to work just fine.