Inline Frame double click

Hello,

I’m using an Inline Frame component in my Perspective page, and I’d like to trigger an event when the frame is double-clicked. However, it seems that click events (including double-click) don’t work on the Inline Frame.

Mouse events such as onMouseEnter, onMouseLeave, onMouseOver, etc. work fine — but not onClick or onDoubleClick.

Has anyone found a workaround for this issue?

I was thinking to send a message handler from the webdev script from inline Frame…but it’s a little overengineering

Thanks,

Paul

Wouldn't you expect the iFrame to pass click actions straight through to the embedded page?

1 Like

Probably not going to be possible. IFrames are quite deliberately isolated from their containing page for security reasons. I'm kinda surprised the MouseOver works.

Kind of a weird trick but if you do not want to actually interact with the inline frame, you could position a label on top of your inline frame (play with position: absolute if you’re using a flex container) and use the onDoubleClick event of the label ?

You didn’t give us much information on what you are trying to achieve, so my idea might be totally useless to you, as my method won’t let you interact with the inline frame anymore.

1 Like

It’s perfect. I added a label overlay on my iFrame, it’s work. Only inconvenient it’s when someone will need that iFrame to have some click actions, for me it’s not the case.

thanks for help :slight_smile:

1 Like