Closed mdulat closed 6 years ago
@dlockhart @awikkerink it isn't clear to me why this build is failing, looks like it timed out. Something I need to investigate, or is it just because this is a fork?
What is the case this change is trying to address?
This allows a user of the component to indicate that form submission should not happen when a user presses Enter within the input field.
Currently in our rubrics Edit views, which live within a form, we are using this component, and when the user presses Enter, the form is submitted. We would like for no action to occur in this case.
Why not catch the events in rubrics? Something like
<form id="form" on-submit="_preventSubmitHandler">
...
<input type="submit" on-click="_submitForm">
</form>
_submitForm: function() {
this.form.submit();
}
This would also prevent other elements from submitting the form.
The form isn't within our component (d2l-rubric), it's within the LMS which houses our component, so we don't want to modify it directly.
Yes probably for types that automatically submit. For rubrics we also have textareas, but they don't submit the form on Enter. I don't have permissions to merge to this repo. If you're ok with it, can you merge it?
Required for https://github.com/Brightspace/d2l-rubric/pull/106