Fix wrong event selector that causes attachment uploading not working (fix #960)