Skip to content

Conversation

aethr
Copy link
Contributor

@aethr aethr commented Oct 12, 2020

This resolves #218 which may be caused by a simple typo in the codebase.

It seems like a core intent of getEventProperties is to source default properties of different types of DOM events from the 'dom-event-types' dep and provide them as properties for new events. However, it looks like the cancelable property is not being added to the returned object.

This change resolves the bug I'm seeing in #218 by allowing click events to have preventDefault work correctly.

I'd be happy to add a test case to test against regression here, but it doesn't seem like a logic bug or something that's likely to be reverted if my above assumptions seem reasonable.

Copy link
Member

@afontcu afontcu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@lmiller1990 lmiller1990 merged commit 3a113c0 into vuejs:master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@click.prevent not setting event.defaultPrevented in jest tests

3 participants