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

Fixes #1794. Prevent form submission when pressing enter #2003

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

miketaylr
Copy link
Member

@miketaylr miketaylr commented Jan 5, 2018

...in the description input.

r? @zoepage

@miketaylr miketaylr requested a review from zoepage January 5, 2018 18:08
// prevent accidental submission with the Enter key
// (for now, just the description input)
Mousetrap.bind("enter", function(e) {
if (e.target.className.indexOf('js-desc') !== -1) {

This comment was marked as abuse.

@miketaylr miketaylr changed the title Fixes #1794. Prevent form submission when pressing enter in the descr… Fixes #1794. Prevent form submission when pressing enter Jan 5, 2018
@miketaylr
Copy link
Member Author

ping @zoepage

@@ -56,7 +56,7 @@ <h3 class="wc-Title--s">Report Site Issue</h3>
{% endif %}
</div>
<span class="wc-Form-validation">
{{ form.description(class_='wc-Form-item required',
{{ form.description(class_='wc-Form-item required mousetrap js-desc',

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr
Copy link
Member Author

This maybe broke other tests... I didn't bother to check Travis because things were broken when I wrote this. >_<

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