Skip to content

preventDefault? #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
teh opened this issue Sep 9, 2016 · 3 comments
Closed

preventDefault? #83

teh opened this issue Sep 9, 2016 · 3 comments

Comments

@teh
Copy link
Contributor

teh commented Sep 9, 2016

Right now I'm stopping events from propagating like this:

onSubmit ev = do
  (unsafeCoerce ev).preventDefault
  ...    

Would you be opposed to me introducing this function (and others from https://facebook.github.io/react/docs/events.html)?

@jasonzoladz
Copy link

Agree. I have a similar function. :(

On Friday, September 9, 2016, teh [email protected] wrote:

Right now I'm stopping events from propagating like this:

onSubmit ev = do
(unsafeCoerce ev).preventDefault
...

Would you be opposed to me introducing this function (and others from
https://facebook.github.io/react/docs/events.html)?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#83, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIE1EKWWPa-LSJMmBDBoeZlWy6wE35Inks5qoeQogaJpZM4J5jGE
.

@ethul
Copy link
Contributor

ethul commented Sep 10, 2016

I do think preventDefault and friends are useful functions to have. Do you think there is any way to leverage preventDefault from purescript-dom?

@ethul
Copy link
Contributor

ethul commented Sep 10, 2016

However, since the react library defines its own Event type, perhaps defining preventDefault separately here does make more sense.

teh added a commit to teh/purescript-react that referenced this issue Sep 10, 2016
paf31 added a commit that referenced this issue Sep 11, 2016
Introduce preventDefault and stopPropagation. See #83.
@paf31 paf31 closed this as completed Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants