Skip to content
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

Prevent default browser behaviour compliant with specs. #36

Merged
merged 1 commit into from
Feb 6, 2017
Merged

Prevent default browser behaviour compliant with specs. #36

merged 1 commit into from
Feb 6, 2017

Conversation

terkelg
Copy link
Contributor

@terkelg terkelg commented Feb 6, 2017

As specified in the DOM 2 Events specification.
I also find this more transparent and understandable.

It's a minor thing, and the downside is a few more characters.
Feel free to close RR if you disagree.

Thanks for your work on HyperApp. 🥇

@jorgebucaran
Copy link
Owner

@terkelg LGTM. Should we call e.stopPropagation too? or is it safe to ignore that one?

@jorgebucaran jorgebucaran self-requested a review February 6, 2017 06:05
@terkelg
Copy link
Contributor Author

terkelg commented Feb 6, 2017

Good question. I think it’s enough, since the goal is to just prevent the default browser behaviour, that's what you want in most situations.

I can’t think of a reason to stop propagation, it's default event behaviour, so I assume it's safe to ignore e.stopPropagation.

@jorgebucaran jorgebucaran merged commit 817be78 into jorgebucaran:master Feb 6, 2017
@jorgebucaran
Copy link
Owner

Thank you @terkelg!

@terkelg
Copy link
Contributor Author

terkelg commented Feb 6, 2017

NP, it's a super interesting project. Keep up the good work!

jorgebucaran pushed a commit that referenced this pull request Feb 6, 2017
* Use more ES6 idioms, arrow funcs, let, and remove hash-based routing by @jbucaran. #34, #35 & #36.
* Introduce webpack, transpile with babel, minify with babili by @maraisr.
* Add some tests by @maraisr 
* Use src directory by @maraisr 
* Use Travis and setup code coverage by @maraisr
jorgebucaran added a commit that referenced this pull request Jan 7, 2018
Prevent default browser behaviour compliant with specs.
jorgebucaran added a commit that referenced this pull request Jan 7, 2018
* Use more ES6 idioms, arrow funcs, let, and remove hash-based routing by @jbucaran. #34, #35 & #36.
* Introduce webpack, transpile with babel, minify with babili by @maraisr.
* Add some tests by @maraisr 
* Use src directory by @maraisr 
* Use Travis and setup code coverage by @maraisr
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.

None yet

2 participants