WICG / soft-navigations

Heuristics to detect Single Page Apps soft navigations
https://wicg.github.io/soft-navigations/
Other
46 stars 6 forks source link

form select "onchange" causing form.submit does not trigger a soft-nav... #15

Open dlueth opened 1 year ago

dlueth commented 1 year ago

... but it feels like it should, correct?

yoavweiss commented 1 year ago

Do you have an example test case that'd enable me to get a better understanding of this?

tunetheweb commented 1 year ago

I think I was talking to @dlueth about this when he raised it, but can't find out where.

I think it was basically the case shown by this simple demo: https://www.tunetheweb.com/experiments/softnavsdemo/onchange.html

tunetheweb commented 1 year ago

Actually the "causing form.submit" confuses me. Using form.submit() from JavaScript will cause a hard navigation (you should use form.requestSubmit() if want to be able to use preventDefault() to prevent the navigation).