Skip to content

Conversation

fghibellini
Copy link

No description provided.

@garyb
Copy link
Member

garyb commented Jul 31, 2018

Is this because its value will change after preventDefault occurs elsewhere?

@fghibellini
Copy link
Author

element.addEventListener('click', evt => {
  console.log(evt.defaultPrevented);
  evt.preventDefault();
  console.log(evt.defaultPrevented);
})

// upon click outputs:

> false
> true

Based on the above behavior I would suppose defaultPrevented cannot be effectless.
Am I missing something?

@garyb
Copy link
Member

garyb commented Aug 2, 2018

No, you're absolutely right - I was just checking I understood the motivation for the change. Thanks!

I'll merge this soon, it's a breaking change, so will need a bit of figuring out. I'll see if I can find anything else that needs breaking at the same time.

@garyb garyb added the accepted label Aug 2, 2018
@garyb garyb merged commit 5e6aa3e into purescript-web:master Feb 23, 2019
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.

2 participants