Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Span's TapGestureRecognizer not working if text is truncated #21837

Open
Veilenus opened this issue Apr 15, 2024 · 1 comment · May be fixed by #22213
Open

Span's TapGestureRecognizer not working if text is truncated #21837

Veilenus opened this issue Apr 15, 2024 · 1 comment · May be fixed by #22213
Labels
area-controls-label Label, Span area-gestures Gesture types platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Veilenus
Copy link

Veilenus commented Apr 15, 2024

Description

Consider a Label with FormattedText and a TapGestureRecognizer attached to one of its Spans. The TapGestureRecognizer does not execute the Command if the Label's text is truncated, either as a result of limiting MaxLines and the available width or by limiting both, width and height.

This bug affects the app on Windows, but not on Android. Other platforms are untested.

Tested versions:

  • 8.0.20 (bug present)
  • 8.0.10 (bug present)

Steps to Reproduce

  1. Check out the attached reprodution repo and start the app on Windows.
  2. Click the highlighted Labels.
  3. Observe that only Labels whose text is fully visible will execute the command (i.e. update the counter).

Link to public reproduction project repository

https://github.com/Veilenus/FormattedTextGestureRecognizerBug

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

Unfortunately, no. A hacky one might be considered if the Label's FontSize and LineHeight are statically known, thus allowing to wrap the Label in a Layout of choice and limiting the latter's HeightRequest instead of the Label's MaxLines.

Relevant log output

No response

@Veilenus Veilenus added the t/bug Something isn't working label Apr 15, 2024
@dotnet-policy-service dotnet-policy-service bot added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 15, 2024
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Apr 15, 2024
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 16, 2024
@XamlTest
Copy link
Collaborator

Verified on VS 17.10.0 Preview 3.0(8.0.20). Repro on Windows 11, iOS 17.2 and MacCatalyst, not repro on Android 14.0-API34 with below Project:
FormattedTextGestureRecognizerBug.zip

kubaflo added a commit to kubaflo/maui that referenced this issue May 5, 2024
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
kubaflo added a commit to kubaflo/maui that referenced this issue May 11, 2024
kubaflo added a commit to kubaflo/maui that referenced this issue May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-label Label, Span area-gestures Gesture types platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants