Fix not calling callbacks on escape press in modal dialog