Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

fix 15378 #15530

Closed
wants to merge 1 commit into from
Closed

fix 15378 #15530

wants to merge 1 commit into from

Conversation

maonaoda
Copy link

@maonaoda maonaoda commented Sep 1, 2022

Description of Change

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

Tapped event gets triggered correctly on Label with multiline spans that are tappable.

None

Before/After Screenshots

  • Brfore
    demo2022090102

  • After
    demo2022090101

Testing Procedure

Hoping

Hope it's fixed soon, not quite like changing the design...

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@net-foundation-cla
Copy link

net-foundation-cla bot commented Sep 1, 2022

CLA assistant check
All CLA requirements met.

@maonaoda
Copy link
Author

maonaoda commented Sep 1, 2022

should be related to #13348

@jfversluis
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Kas-code
Copy link

I would really appreciate if this can be merged in guys. This is causing a huge issue in my production app.

Is this issue fixed in MAUI? If so, then I will upgrade the app to MAUI.

@maonaoda
Copy link
Author

not yet, since maui is using this same code↑ as xamarin so this bug also exists.

@Kas-code
Copy link

@maonaoda Thanks for the info.
I am keen to get this fixed.
What is left to do to get this merged in?
How can I help?

@maonaoda
Copy link
Author

Submit a new Issue to MAUI, then waiting for them to notice and fix on Maui。
I think Xamarin is unlikely to fix,.
And change UI design may be another way to avoid this problem that i did.

@Kas-code
Copy link

@maonaoda I implemented a custom renderer which overrides LabelRenderer in my project, and also overrode the function RecalculateSpanPositions in order to use your code change inside my project.

It mostly fixes the issue but there is still a small bug.

If the span at the end of the line is only one character long then it is not clickable.

If the span at the end of the line is more than one character long, then clicking anywhere in the span, apart from the last character triggers the click event.

So I think that the spanEndX is off by one character. I've tried to look into how to fix this but I can't figure it out.

Do you have any advice?

@thisisthekap
Copy link
Contributor

@jfversluis Any chance that this one is making it into a Xamarin.Forms service release?

@jfversluis
Copy link
Member

Now that we're so close to the sunsetting of Xamarin.Forms unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR.

Please have a look at the evolution of Xamarin.Forms, .NET MAUI. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.

Again, thank you so much for being a contributor and Xamarin.Forms user!

@jfversluis jfversluis closed this Apr 25, 2024
@maonaoda
Copy link
Author

I will check it on maui~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] TapGestureRecognizer Tapped event gets triggered incorrectly on Spans when text in the span is multiline
4 participants