Skip to content

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

Merged
miketaylr merged 1 commit intomasterfrom
issues/1794/1
Jan 12, 2018
Merged

Fixes #1794. Prevent form submission when pressing enter#2003
miketaylr merged 1 commit intomasterfrom
issues/1794/1

Conversation

@miketaylr
Copy link
Copy Markdown
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
Comment thread webcompat/static/js/lib/bugform.js Outdated
// 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
Copy Markdown
Member Author

ping @zoepage

Comment thread webcompat/templates/home-page/form.html Outdated
</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
Copy Markdown
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