Xamarin.Forms
Xamarin.Forms copied to clipboard
fix 15378
Description of Change
Issues Resolved
- fixes #15378
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
-
After
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)
should be related to #13348
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
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.
not yet, since maui is using this same code↑ as xamarin so this bug also exists.
@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?
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.
@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?
@jfversluis Any chance that this one is making it into a Xamarin.Forms service release?
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!
I will check it on maui~