Enable and disable the commentDlg buttons when showing/hiding.
Review Request #3561 — Created Nov. 25, 2012 and submitted
Enable and disable the commentDlg buttons when showing/hiding. When the commentDlg was hidden, the buttons were still enabled. This meant that if the input focus was set on those buttons and the user hit the "enter" button, it would end up doing bad things. This change makes it so the buttons are disabled when the dialog is hidden and enabled (if appropriate) when it opens.
Opened the commentDlg for both new and existing comments and saw the buttons enabled or disabled as appropriate. Verified that typing into an empty input field still enabled the "Save" button. Tested additional keyboard input after closing the dialog and saw that my keystrokes were ignored as expected. Without this patch, the bug reproduces.