better handling of TAB key outside modal dialog