Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Guard against missing SubmitEvent API support #349

Closed robjwells closed 3 years ago

robjwells commented 3 years ago

PR #283 switched to the SubmitEvent API for handling button transitions, but there is no support for SubmitEvent in Safari.

This resulted in an exception being thrown when we try to access the event submitter’s properties (as there is no submitter in Safari). In turn, this interferes with the submission of the form itself.

This change guards against missing support, and uses the previous behaviour in that case.

Polsaker commented 3 years ago

Good catch!