Select to view content in your preferred language

Resize custom widget with iframe doesn't work as expected

314
3
Jump to solution
07-29-2024 05:02 AM
EivindG
Emerging Contributor

Hi, I have created a custom widget where the content is just an iframe with a webpage, and I have placed this widget inside the Widget Controller widget in floating mode. The widget works as it should except a misbehaviour when I try to resize the widget window. When I try to resize, it works as normal when dragged outwards, but when dragged inwards it stops resizing. If I release the resize handle when the mouse is over the iframe, it is like the resize handle is locked when I move the mouse out of the iframe again.

Does anyone know what can be done to solve this issue?

1 Solution

Accepted Solutions
kaifeiji
Occasional Contributor

Hi EivindG.

I think the reason is the iframe's event bubbling mechanism.

Straight forward, the iframe eat the mousemove event and the panel is unknown of the inward dragging.

This might be fixed by a mask when resizing or something else.

View solution in original post

3 Replies
EivindG
Emerging Contributor

The same behaviour occurs for all websites I have testet so far, so it seems this is the general case when using iframe inside the widget controller.

0 Kudos
kaifeiji
Occasional Contributor

Hi EivindG.

I think the reason is the iframe's event bubbling mechanism.

Straight forward, the iframe eat the mousemove event and the panel is unknown of the inward dragging.

This might be fixed by a mask when resizing or something else.

EivindG
Emerging Contributor

Thanks @kaifeiji ! Your tip made me find this, which mostly solved the problem for me 🙂

0 Kudos