Remove keyup event listener for forms (#184)

Let the browser take care of when to do implicit submission.
This commit was merged in pull request #184.
This commit is contained in:
BehindTheMath
2018-11-20 21:17:54 -05:00
committed by GitHub
parent 52fb3bf938
commit fefb63ae87
2 changed files with 0 additions and 30 deletions

View File

@@ -99,30 +99,6 @@ tape("test options are not modified by attachForm", function(t) {
t.end()
})
tape("test submit triggered by keyboard", function(t) {
var form = document.createElement("form")
var pjax = {
options: {},
loadUrl: function() {
t.equal(form.getAttribute(attr), "submit", "triggering a internal link actually submits the form")
}
}
t.plan(2)
attachForm.call(pjax, form)
form.action = window.location.protocol + "//" + window.location.host + "/internal"
trigger(form, "keyup", {keyCode: 14})
t.equal(form.getAttribute(attr), "", "keycode other than 13 doesn't trigger anything")
trigger(form, "keyup", {keyCode: 13})
// see loadUrl defined above
t.end()
})
tape("test form elements parsed correctly", function(t) {
t.plan(1)