According to the HTML spec the default button type is submit. This was causing the form to call ok() as well as it was always performing a submit when the cancel button was clicked. Using type button fixes this issue as the spec states this type "Represents a button with no additional semantics."
According to the HTML spec the default button type is
submit
. This was causing the form to callok()
as well as it was always performing a submit when the cancel button was clicked. Using typebutton
fixes this issue as the spec states this type "Represents a button with no additional semantics."