making "close dialog on background click" a setting, with appropriate unit test