You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Huh, that definitely seems odd. I think the first step here would be to reproduce the issue in a failing test here to the addon. I'm happy to dig into this deeper if you can submit a failing test PR...
test('It fires form.reset events',asyncfunction(assert){assert.expect(3);this.onReset=(e)=>{assert.ok(true,'a reset event is fired');assert.ok(einstanceofwindow.Event,'It receives a native event');// NB this line:assert.equal(document.querySelector('.target-input').value,'original value','resets the form');};this.render(hbs`<form onreset={{onReset}} class="target-form" > <input value="default value" class="target-input"></form>`);awaitfillIn('.target-input','new value');awaittriggerEvent('.target-form','reset');});
The key "failure" is that the form doesn't actually reset when you fire a reset event. But I'm not sure it should. It does when you call jQuery('form.some-form').trigger('reset'). Perhaps that's a quirk of jQuery, though I don't see it in the source. Everything else passes just fine. And if I call document.querySelector('.target-form').reset(), the form resets and triggers the (native, of course) event.
I have a test that looks like
But the
reset
doesn't seem to fire.The test works if I change that line to
or to
The text was updated successfully, but these errors were encountered: