Skip to content

Commit

Permalink
fix(listbox): Update submit button querySelector specificity (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrannes authored and chaance committed Jul 15, 2022
1 parent 7b1d0a6 commit fea9f0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/listbox/src/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ function submitForm(data: ListboxStateData, event: any) {
// sucker.
let { hiddenInput } = event.refs;
if (hiddenInput && hiddenInput.form) {
let submitButton = hiddenInput.form.querySelector("button,[type='submit']");
let submitButton = hiddenInput.form.querySelector(
"button:not([type]),[type='submit']"
);
submitButton && (submitButton as any).click();
}
}
Expand Down

0 comments on commit fea9f0b

Please sign in to comment.