IFrame in app and event propagation

2 Kommentare

  • franklinjosh

    Well, I don't think events bubble up from inside of iframes so I'm not sure there's much you can do about it, aside from preventing scroll on the page all together (which, you can't actually do using event.preventDefault() in a scroll event listener). It's funky browser behavior that cause the top level window to scroll when the iframe has no more room to scroll.

  • Robert Porter

    It's not that events are not bubbling up from the iframe, it's that they are being captured on the div containing the iframe, rather than the content of the iframe itself(and it's not from clicking a border or something). This means when you click or scroll, nothing happens at all because, so the app apears frozen. This happens only sporadically, it doesn't seem to have anything to do with with scroll bar position or where you're clicking. 

    What's suspicious is that if I add an event handler on the div containing the ifame that logs clicks, I can see that zendesk is also capturing those events when things go bad. When things go bad, clicks are being captured by zendesk and  every click send a request to /embeddable_blip. As soon as Zendesk stops capturing the clicks(clicks don't make a request to embeddable_blip when I click), then they properly are handled by the iframe and not it's container.

    Also creating a standalone application with just just nested iframes containing my "app" works perfectly. So I highly suspect there's something in Zendesk that causing this behavior, but again I don't actually know what's wrong. 



Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk