changed from srcElement to target for Firefox