I have a Zendesk app, where the HTML basically is just a div around an IFrame. My problem is that events like click and scroll seemingly randomly are being captured by the iframe container and not the contents. Of course this means that when you click something on the app, the iframe contents don't receive the click, so nothing happens. It happens pretty infrequently, and nothing I am doing seems to be triggering it, and then it stops seemingly randomly as well. Sometimes it happens when the app is "doing stuff", sometimes when the code is totally idle. I have no way to consistently reproduce other than just refreshing my app like 15 times.
I have tried to reproduce this outside of Zendesk by just creating a standalone app with an iframe containing my apps iframe, to see if it's just something weird with nested iframes and everything works fine. The issue seems to only happen in Zendesk. The issue also only seems to happen in cromium based browsers(edge, chrome), or at least it does not seem to happen in firefox.
Whenever this happens(container captures events and not contents), watching network traffic, every click creates a request in Zendesk to an endpoint /embeddable_blip and it looks like it's sending some base64 encoded analytics information about the click. I'm not totally convinced that this is something that Zendesk is doing(but I can't get it to break anywhere else, so I have some suspicion). Trying to figure out how Zendesk is adding event handlers and propagating/bubbling events in their minified code is apparently beyond my abilities. I have other zendesk apps with pretty much just an iframe as the contents and have not seen this problem before, and I can't imagine I'm the only one that does that, so it's also probably something in my code but I have no idea.
Any help or suggestions would be greatly appreciated.