LiveView SwiftUI WKWebView `phx-click`,`phx-click-away` broken after opening Safari


I have ran into a weird issue that a click event stops working after navigating away from my iOS app which is basically a WKWebView. This does not reproduce on iOS Safari as well as PWA mode on iOS.


I have an iOS app which opens a WKWebView pointed to my LiveView app, after opening any external link in an external app, and returning to the app the LiveView can’t handle executing those events. I can log the click event, i can find the reference element, but no matter what i’ve done the liveview.execjs event doesn’t do it’s job on the target element.


I made a custom web element to handle this. as i’ve tested and a pure javascript implementation still works fine, it’s something specific with liveview, in this edge case.

Ok this is actually a deeper issue made a bug report here: