- 🇩🇪Germany dreizwo
To have a simply reproducer - do following:
* Do a fresh install and enbale sitewide_alter as recommended.
* Enable automatic refresh
* Create a Node that should show an alert (add sitewide_alter and restrict to this node )
* add this snippet (f.x. with custom block ) somewhere on this site to simulate pushstate and history manipulation:<div> <h2> Client Side Navigation </h2> <button onClick="push('/node/1')">Show alert</button> <button onClick="push('/node/2')">Don't show alert - Push</button> <button onClick="replace('/something/other')">Don't show alert - Replace</button> <button onClick="history.back()">Back</button> <button onClick="history.forward()">Forward</button> </div> <script> function push(url){ history.pushState({"page": url}, '', url); } function replace(url){ history.replaceState({"page": url}, '', url); }
* render node/1
If the history is changed by any third party lib, the rendered alert is not dismissed or re-initialized until the automatic refresh is executed.
Unfourtunatly - if the history is changed by pushstate events - you will not receive a onpopstate event we could listen for. Therefore this patch contains a proxy based hook to dispatch a custom event.
After applying patch the alert is immediatly rendered/dismissed.
- Status changed to Needs review
almost 2 years ago 10:52am 29 January 2023 - 🇮🇳India Jasjeet Kaur Brar
Hi @dreizwo I followed all the steps mentioned in #3 but unable to reproduce it.
- Status changed to RTBC
over 1 year ago 8:42am 16 May 2023 - 🇪🇸Spain alexortega_98 Seville
I could reproduce it,before the patch, it took around 15 seconds to load the alert, but after it, the alert shows right away without problems.
-
ChrisSnyder →
committed dbbf3a29 on 2.x authored by
dreizwo →
Issue #3320745 by dreizwo, stefanweber, jcnventura, alexortega_98:...
-
ChrisSnyder →
committed dbbf3a29 on 2.x authored by
dreizwo →
- Status changed to Fixed
over 1 year ago 5:27pm 16 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.