Bug 2787 - LinkLabel doesn't release capture on click
Summary: LinkLabel doesn't release capture on click
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: PC Linux
: Lowest normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-01-09 06:25 UTC by eb1
Modified: 2014-05-15 17:11 UTC (History)
2 users (show)

Tags: mono-community
Is this bug a regression?: ---
Last known good build:

Proposed fix (1.88 KB, patch)
2012-01-11 02:16 UTC, eb1
Test case (1.74 KB, application/x-zip-compressed)
2012-01-16 10:46 UTC, eb1

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description eb1 2012-01-09 06:25:15 UTC
When clicking on a LinkLabel mouse movements are still captured when OnLinkClicked (and MouseUp event) are called. Depending on what clients do when handling these events this might cause the UI to lock up.

When using a Button instead of a LinkLabel the capture gets released before the event gets passed on to the client.
Comment 1 eb1 2012-01-11 02:16:16 UTC
Created attachment 1165 [details]
Proposed fix
Comment 2 Miguel de Icaza [MSFT] 2012-01-13 18:02:46 UTC
Could you provide a test case that shows this problem happening?
Comment 3 eb1 2012-01-16 10:46:01 UTC
Created attachment 1202 [details]
Test case

To see this problem run the attached project in debugger. Set a breakpoint in Form1.HandleClick, then click on the LinkLabel. Notice that you can't click anywhere while you're stopped in the debugger. Keyboard works however.

Compare this to clicking the Button where you'll be able to click with the mouse even when stopped in the debugger.
Comment 4 eb1 2014-03-13 09:28:18 UTC
Improved fix in PR #950.
Comment 5 Miguel de Icaza [MSFT] 2014-05-15 17:11:31 UTC