Attach is not properly cleared on cancel of file choosing in Chrome

closes #1076