fix: bug where closing a dialog is treated like clicking OK, not Cancel (dates from 0.21-19 or earlier)