-
Notifications
You must be signed in to change notification settings - Fork 998
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
Undo operation in DemoConsole causes ContextMenuStrip to become unusable #12591
Comments
This issue caused by PR #11358 |
CC: @kirsan31 |
Will look as soon as I can (most likely on the weekend). |
After brief look: There are a lot of additions and deletions going on there (clearly more than necessary). Need more deep investigation... ---------------------UPD--------------------- "Type Here" element Inserted in this method: ---------------------UPD2--------------------- The problem is in winforms/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs Line 1589 in 034543a
After #4808 fix ---------------------UPD3--------------------- The call sequence is:
So theoretically we can change the order of |
…p to become unusable
@Nora-Zhou01 - do you see any similar problems in the Visual Studio designer for applications targeting NET9? |
Them shouldn't be there, the problem is in the fix described above (main branch). And I suggested to roll it back. |
…et#12729) Fix dotnet#12591. This reverts dotnet#4808 fix commit from dotnet#11358 PR. The disposal of DisplayedItems after removal has already been implemented in DoLayoutIfHandleCreated but only if handle was created. So we have a leak only if handle is destroyed (dotnet#4808 case) and we didn't take this into account.
Verified this issue on winforms repo from main branch, it has been fixed: the ContextMenuStrip works well after clicked Undo. testresult.mp4 |
.NET version
.NET 10.0 main branch of WinForms repo
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, this is a regression issue. Not repro on .NET 9.0 from Release/9.0 branch of WinForms repo.
Issue description
In the DemoConsole test application in the Winforms repo, the Undo operation causes the ContextMenuStrip to be unusable.
.NET 10
democonsole.undo.main.mp4
.NET 9.0
democonsole.undo.9.0.mp4
Steps to reproduce
Test sample: DemoConsole in Winforms repo
The text was updated successfully, but these errors were encountered: