peckadesign / pd-naja

1 stars 0 forks source link

fix: Better detection of non-ajax forms in `BtnSpinnerExtension` #24

Closed zipper closed 3 months ago

zipper commented 3 months ago

In some very rare cases, there could be a duplication of spinners created by this extension in Safari. There the submit event on ajax forms is not prevented (in other browsers there's no submit event) and if options.btnSpinnerInitiator is somehow changed to another element then interacted (for example to some confirmation dialog button), the interacted element received the spinner from the submit handler dedicated to non-ajax forms only. Now this listener explicitly checks if the form is not being handled by Naja before it creates its spinner.