SQL Server Management Studio Tab hangs the whole SSMS when working with dual monitors
This is a bug I found the other day while I was trying to create a new table via the SSMS ( I am working with dual screens here).
Here is what I did
1. As always, I started by right clicking Tables > New > Table via the objects explorer in my Left monitor.
2. After the UI to create new table opened, I dragged the Tab to the other monitor to my right on full screen.
3. I then added a few columns and normal stuffs.
4. I then pressed Ctrl + S to finally save my table which opens up a windows form dialog to provide a table name. I however did not close that dialog.
5. Without closing that dialog, I then moved to the Objects Explorer to look through some other tables.
6. And thats it. Now the Tab with my newly unsaved table to the right screen hangs.
7. Not only that, but If I am unable to create a new table via the same process, or Design an existing table and many more.
That is all.
And when you do eventually shut down SSMS, you may get a warning with the following text:
"Microsoft SQL Server Management Studio has detected that an operation is blocking user input. This can be caused by an active modal dialog or a task that needs to block user interaction. Would you like to shut down anyway? <YES/NO>"
My prior suggestion of how to exit this "frozen" state may still leave certain things in SSMS non-functional until you restart it. For example, I was unable to use certain keys like backspace and tab after doing this and attempting to edit code in a new query window.
You can also get SSMS into this same state when using a single monitor; just undock the tab for the new table and keep it on the primary / only monitor. If Ctrl+S doesn't bring up the Save box, use File > Save in the primary window, then switch back to the primary window when the save box appears, and attempt to enter design mode for another table.
This isn't something I'd normally do with SSMS, but, I was able to reproduce the issue in SSMS 18.1. Also, while not ideal, I discovered that you could do the following to get out of this mode:
1. In the primary SSMS window, open the Window menu, select "Windows...". In the Windows window, select the name of the secondary / frozen window. Click Save. A new "save" box will appear. Name the table and click OK to save. The secondary window is still open, but the table has been saved.
2. Open Window > "Windows..." again, select the name of the secondary / frozen window, then click the "Close Window(s)" button. The secondary / frozen window will be closed, and you can then edit other tables. Alternatively, selecting Window > Close All Documents will close the secondary / frozen window (as well as any other windows).