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

RichTextBlock hyperlinks do not work with touch on Windows 11 #6513

Closed
riverar opened this issue Dec 22, 2021 · 26 comments
Closed

RichTextBlock hyperlinks do not work with touch on Windows 11 #6513

riverar opened this issue Dec 22, 2021 · 26 comments
Labels
Milestone

Comments

@riverar
Copy link
Contributor

riverar commented Dec 22, 2021

Describe the bug

Tapping a Hyperlink present in RichTextBlock content does nothing on Windows 11.

Steps to reproduce the bug

  1. Install the XAML Controls Gallery app
  2. Open the XAML Controls Gallery app and navigate to the RichTextBlock sample. (Navigate to Text > RichTextBlock or use deep link xamlcontrolsgallery://item/RichTextBlock)
  3. Click the hyperlinks link in the second sample. Observe the browser opens.
  4. Tap the hyperlinks link in the second sample. Observe nothing happens.

Or create a blank app with one of the affected NuGet packages below.

Feedback Hub link from @MarcAnt01: https://aka.ms/AAf9oe4

richtextblock_touch_g88

❌ This critically impacts app accessibility. Please strongly consider for servicing. (cc: @codendone)

Expected behavior

Similar or same behavior (hyperlink handler executes, browser opens, etc.) in both click and tap scenarios.

NuGet package version

  • 2.7
  • 2.8.0-prerelease.210927001
  • Windows App SDK 1.0 (cc: @andrewleader)

Windows app type

UWP/Win32

Device form factor

Desktop

Windows version

Windows 11 22000.194 (RTM) and above

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 22, 2021
@BreeceW
Copy link
Contributor

BreeceW commented Dec 22, 2021

From what I can tell, this is caused by CommonStyles/Hyperlink_themeresources.xaml#L23 <x:Boolean x:Key="HyperlinkUnderlineVisible">False</x:Boolean>. Setting this value to True resolves the problem. Interestingly, despite the name, HyperlinkUnderlineVisible does not seem to affect whether the hyperlink underline is visible. This problem affects WinUI 2 and WinUI 3 in the same way. It looks like HyperlinkUnderlineVisible was added in Windows 11, as it is present and set to True in the generic.xaml file for 10.0.22000.0.

In my opinion, just strike the HyperlinkUnderlineVisible line in the WinUI style, since a) it didn’t work anyway, and b) it would resolve this issue, which is a major usability concern.

@asklar
Copy link
Member

asklar commented Jan 8, 2022

CC @ranjeshj

@asklar
Copy link
Member

asklar commented Mar 1, 2022

@gegao18 I think this one's already fixed?

@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Mar 2, 2022
@riverar
Copy link
Contributor Author

riverar commented Mar 9, 2022

Looks like latest dev build 22572 has a mitigation. I really hope this is also going into servicing pipeline for existing Windows 11 installs.

Mitigated an issue where clicking hyperlinks in RichTextBlocks wasn’t working when performed with touch or pen.- https://blogs.windows.com/windows-insider/2022/03/09/announcing-windows-11-insider-preview-build-22572/

@MarcAnt01
Copy link

I am on 22581 and nothing changed. I don't understand why this has constantly being ignored when it's simply a one link patch as @BreeceW has shown, in the meanwhile a lot of users cannot open links without a keyboard or a mouse attached and ofc they blame the application developers. I understand you are looking for a fix rather than a patch, but leaving users with a broken behavior in the meanwhile sounds like a really bad decision. For a bug like this one, even affecting accessibility I think the minimum that could be done is releasing a patch in the next winui release

@krschau krschau added the team-Rendering Issue for the Rendering team label Jun 8, 2022
@Calphalon
Copy link

I there any update to this? Over a year ago it was noted as being fixed in an upcoming W11 build and it is still not. I am almost finished with a UWP app with over 300 RTB hyperlinks and, now that I am testing touch, I see none of them work with touch. It's useless to the end user on a touch device. But I did get Clip Champ.

@riverar
Copy link
Contributor Author

riverar commented Apr 27, 2023

@asklar @bpulliam Can one of you chase this down? Did the mitigation break?

@MarcAnt01
Copy link

@asklar @bpulliam Can one of you chase this down? Did the mitigation break?

It looks like it started occurring again, yeah😔

@bpulliam
Copy link
Contributor

bpulliam commented May 1, 2023

I've asked the team to dive into this.

@bpulliam bpulliam added the fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. label May 9, 2023
@bpulliam
Copy link
Contributor

bpulliam commented May 9, 2023

We have a fix for this regression in main. Next step is to get it into 1.3 servicing.

@MarcAnt01
Copy link

MarcAnt01 commented May 9, 2023

We have a fix for this regression in main. Next step is to get it into 1.3 servicing.

How about UWP apps? Will they keep showing this bug for ever?

@Calphalon
Copy link

Is there any update for this issue? I am hoping to release my app soon and a whole section does not work with touch.

@bpulliam bpulliam added fixed-in-WinAppSDK1.3 and removed fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. labels Jun 14, 2023
@bpulliam
Copy link
Contributor

Fixed in 1.3.2

@Calphalon
Copy link

Sorry, but what does Fixed in 1.3.2 actually mean? It does not seem to have anything to do with my Windows Version. After digging it seems to refer to the Windows App SDK, but how does this fix WinUI2 UWP apps?

@MarcAnt01
Copy link

I still find quite embarassing how this issue is being triaged, it's evident that is a bug affecting both UWP and WinUI 3, even inbox apps are broken for this reason, but you keep mentioning only WinUI 3 and WASDK.....

@riverar
Copy link
Contributor Author

riverar commented Jun 14, 2023

@bpulliam Is this going to be considered for OS servicing (UWP/WinUI 2)? Apps such as Mail are affected.

@bogdan-patraucean
Copy link

bogdan-patraucean commented Jun 15, 2023

This is fixed and should be closed according to the latest release notes.
Can somebody test?

@riverar
Copy link
Contributor Author

riverar commented Jun 15, 2023

No @bogdan-patraucean, this is not ready for closure. There is still the outstanding question of servicing this for UWP/WinUI 2 targets.

@BreeceW
Copy link
Contributor

BreeceW commented Jun 15, 2023

I realize in my earlier comment from 2021 that I did not make it clear that if this issue is blocking your app with WinUI 2, you can work around it by adding the following resource HyperlinkUnderlineVisible to your application resources in App.xaml.

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <muxc:XamlControlsResources xmlns:muxc="using:Microsoft.UI.Xaml.Controls" />
            <ResourceDictionary>
                <x:Boolean x:Key="HyperlinkUnderlineVisible">True</x:Boolean>
            </ResourceDictionary>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

This lightweight style overrides the resource in WinUI 2’s default hyperlink style and tapping hyperlinks will start working again with touch.

With that said, it’s still important to fix this bug in the OS. A WinUI 2 update changing the hyperlink style as above would also mitigate the problem.

@Calphalon
Copy link

@BreeceW - Thanks for the clarification. I made the change, and (at first glance) it seems to work just fine for my app.

@ranjeshj
Copy link
Contributor

Sorry, there are currently no plans to fix this in WinUI2. Please see this PR for more details - #8761

@ranjeshj ranjeshj closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@MarcAnt01
Copy link

@ranjeshj I don't see how this issue is even related to the pr that has been linked

@riverar
Copy link
Contributor Author

riverar commented Aug 29, 2023

I think what @ranjeshj was trying to say was there's a new policy in effect and the team doesn't deem this business critical.

Because WinUI 2 is in maintenance mode, new bugs filed against it are closed unless they’re a security issue or are business critical.

@ranjeshj
Copy link
Contributor

ranjeshj commented Aug 30, 2023

@riverar and @MarcAnt01 that is correct. This issue is fixed in WinUI3. The bar for servicing fixes into WinUI2 is very high as mentioned in the PR. That said, looking closer, the fix for this is in OS Xaml codebase not in WinUI2. So this would be an OS servicing fix :/

@Calphalon
Copy link

Business Critical for whom? The developers and the users, or is something else more important? I understand not adding new features, but this once worked and then was broken. So seems the right thing to do is put it back the way it is supposed to be.

@MarcAnt01
Copy link

@riverar and @MarcAnt01 that is correct. This issue is fixed in WinUI3. The bar for servicing fixes into WinUI2 is very high as mentioned in the PR. That said, looking closer, the fix for this is in OS Xaml codebase not in WinUI2. So this would be an OS servicing fix :/

The team should revise the decision, imagine a big app like Whatsapp in the store, it's affected by this bug and I cannot open links with touch. I understand that Microsoft doesn't care about touch at all, but since this was broken at a certain point and the fix seems quite trivial, why cannot you address this instead of forcing all the devs to use a one-line fix?

The way Microsoft is handling this stuff not only degrades the user experience, but also contributes to increase the bad vision that most companies have of Microsoft.

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

No branches or pull requests