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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user