inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.3k stars 423 forks source link

Fast form updates causing a "SecurityError: Attempt to use history.replaceState() more than 100" in Safari #1812

Open duswie opened 7 months ago

duswie commented 7 months ago

Version:

Describe the problem:

Fast updates of data within a remembered form created with useFrom('key, ...) are causing a Unhandled Promise Rejection: SecurityError: Attempt to use history.replaceState() more than 100 times per 10 seconds error.

Such quick updates can be made, for example, when using RangeSlider as user input. This can of course be prevented by a rate limit before changing the form value, but I think limiting the history.replaceState() calls to avoid browser errors should be a be handled by inertia?

Seems to be limited to Safari, tested with Version 17.2.1 on macOS 14.2.1.

Steps to reproduce: