Bug 2787

Summary: LinkLabel doesn't release capture on click
Product: [Mono] Class Libraries Reporter: eb1
Component: Windows.FormsAssignee: Bugzilla <bugzilla>
Severity: normal CC: miguel, mono-bugs+mono
Priority: Lowest    
Version: 2.10.x   
Target Milestone: Untriaged   
Hardware: PC   
OS: Linux   
Tags: mono-community Is this bug a regression?: ---
Last known good build:
Attachments: Proposed fix
Test case

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