Modal not working on Firefox

I have a project and the modals are working on Chrome, Opera, Safari. I found a bug report to the livewire repo that matches what we are facing, anyone else having this issue? Link to github discussion: https://github.com/livewire/livewire/discussions/7746),
GitHub
Too many calls to location or history APIs in a short period of tim...
Livewire version 3.3.5 Laravel version 10.41.0 Which PHP version are you using? PHP 8.3 Steps To Reproduce Using Firefox, when you click several times on one or more links in the side menu (I'm...
11 Replies
Renan Pereira
Renan PereiraOP3mo ago
Error message:
Renan Pereira
Renan PereiraOP3mo ago
No description
LeandroFerreira
LeandroFerreira3mo ago
https://demo.filamentphp.com there are no errors using Firefox on my end..
Andrew Wallo
Andrew Wallo3mo ago
Is it only specific to modals you’re saying?
Renan Pereira
Renan PereiraOP2mo ago
Yes, specific to modals We "fixed" by applying the code below {{-- Corrigir o problema no Firefox --}} {{-- Too many calls to location or history APIs in a short period of time. --}} <script> const original = window.history.replaceState; let timer = Date.now(); let timeout = null; let lastArgs = null; window.history.replaceState = function (...args) { const time = Date.now(); if (time - timer < 300) { lastArgs = args; if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { original.apply(this, lastArgs); timeout = null; lastArgs = null; }, 100); return; } timer = time; original.apply(this, args); }; </script>
Andrew Wallo
Andrew Wallo2mo ago
Kind of weird that its happening with modals specifically. I would have expected the issue to occur just when navigating Resource pages quickly in the UI. I guess action modals do use query strings though which does use the history api, so I'm not too surprised. I just wish someone with enough Javascript experience and experience with Livewire's frontend code would make a PR given that I kind of gave all of the information regarding the issue in that discussion post.. Also, this does happen... Even in the demo. It's pretty easy to replicate. Just click around on the navigation items quickly.
Andrew Wallo
Andrew Wallo2mo ago
No description
awcodes
awcodes2mo ago
There is actually an open bug in livewire for this. It’s not specific to filament.
Andrew Wallo
Andrew Wallo2mo ago
Yes I know. Thats what I was talking about I replied on the discussion post on Livewire's github repo
awcodes
awcodes2mo ago
Was just commenting for OP
Andrew Wallo
Andrew Wallo2mo ago
Oh okay sounds good!
Want results from more Discord servers?
Add your server