Fix popup confirmation bug when the user try to close a dirty new game tab.

Fix the bug that prevents the popup confirmation to display to ask user whether to close the tab if it is modified.

Reported-by: hlong290494 & bnurbekov
Signed-off by: Long Nguyen Duc Hoang <lhnguyenduc@wpi.edu> and Batyrlan Nurbekov <bnurbekov@wpi.edu>