You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you tap "Menu example" you'll see an alert with "connect". When you tap the back button you'll see "disconnect". But if you tap "Menu example" then pull-to-refresh, you only receive "connect" again. You never receive "disconnect".
This can cause issues if a page adds a native bar button item only for signed in users. If the user signs out and the page is reloaded, there's no hook to remove the button because disconnect() is never called.
The text was updated successfully, but these errors were encountered:
Turns out refreshing a page in a web view won't call disconnect() either. So this isn't actually a Hotwire Native issue. But I'm curious as to why this occurs.
Reloading a page, either via pull-to-refresh or by calling
navigator.reload()
, does not triggerdisconnect()
on any connected Stimulus controllers.To reproduce, apply the following diff to the demo app server:
When you tap "Menu example" you'll see an alert with "connect". When you tap the back button you'll see "disconnect". But if you tap "Menu example" then pull-to-refresh, you only receive "connect" again. You never receive "disconnect".
This can cause issues if a page adds a native bar button item only for signed in users. If the user signs out and the page is reloaded, there's no hook to remove the button because
disconnect()
is never called.The text was updated successfully, but these errors were encountered: