RichTextBox `LinkClicked` event doesn't work for "friendly named" hyperlinks
See original GitHub issue- .NET Core Version: (e.g. 3.0 Preview1, or daily build number, use
dotnet --info) - Have you experienced this same bug with .NET Framework?: Yes
Problem description:
With the removal of the quirk Switch.System.Windows.Forms.DoNotLoadLatestRichEditControl (https://github.com/dotnet/winforms/pull/1139/commits/3f2ca8a2a3e19ea7431279defcebec14e2ca59ea) we may regress because we will use newer RTB controls (4.0+) and users will no longer be able to load older RTB controls that handled some hyperlinks differently.
Please refer to https://stackoverflow.com/q/56936777/2338036
Actual behavior:
Expected behavior:
Minimal repro:
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
Some hyperlinks don't trigger the LinkClicked event when ...
When using the Friendly Name Hyperlinks available in the RichEdit50 control, the RichTextBox.Text.Length property can be less than the c.
Read more >WinForm RichTextBox LinkClicked event fails to fire when ...
RichEdit50 supports showing friendly name hyperlinks, just like the one in this sentence. The LinkClicked event may or may not fire depending on ......
Read more >RichTextBox doesn't raise LinkClicked for last link.
I load a simple RTF document with several links in it (created with MS Word) into the control. The LinkClicked event does not...
Read more >Why EventHandler not working for a linklabel in ...
I have done this test to erase the RichTextBox when i click on the generated labellink in the richtextbox. Links are always differents...
Read more >Links with arbitrary text in a RichTextBox
My extension turns this property off by default because it can interfere with links that have been added programmatically. When the DetectUrls ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Verified this bug with .Net core 3.0.100-rc1-014190 from release branch, RichTextBox
LinkClickedevent can work for “friendly named” hyperlinks. Please see the following Gif:@RussKie considering you said in PR #1661 that Issue #1520 will be fixed by said PR, this issue can’t be a duplicate.
This repros on Desktop Framework and I’d assume it also repros in .NET Core. Since the bug fixed by PR #1661 never existed in Desktop Framework it can’t be the same issue. The problem the stackoverflow article was about is a regression in the Desktop Framework long ago (by updating to a newer version of the RTF control which supported features WinForms doesn’t understand).
I’d recommend to reopen so this can be fixed at some point. Of course you are free to reprioritize, it might not be necessary to fix for 3.0 since it repros on Desktop Framework by default and the only thing you took away is the known workaround to downgrade the RTF control.
(Note for anyone wanting to investigate: the exact location of the bug was already root-caused in the stackoverflow article linked in the issue description, so you don’t need to do that yourself again.)