Opened 7 years ago

Closed 7 years ago

#16342 closed defect (fixed)

on.emit() doesn't set evt.defaultPrevented for IE6-8

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9
Component: Events Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

on.emit() supports event emission even on older browsers that don't support dispatchEvent(). But in this case, evt.defaultPrevented is not set. It works on newer browsers.

Attachments (1)

synthClick.html (1.1 KB) - added by bill 7 years ago.
test case, press button and see console messages

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by bill

Attachment: synthClick.html added

test case, press button and see console messages

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9
Owner: changed from Kris Zyp to bill
Status: newassigned

Strangely, it sets event.cancelable to false, maybe meaning that you can't cancel the event because it's already cancelled??

In any case, this is a one line fix so I'll check it in.

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29960]:

Set evt.defaultPrevented when evt.preventDefault() is called on synthetic events emitted via on.emit(), fixes #16342 !strict

Note: See TracTickets for help on using tickets.