Skip to content
Snippets Groups Projects
Commit bd1d9301 authored by Samuel Degueldre's avatar Samuel Degueldre
Browse files

[FIX] web: allow popover on element in iframe in debug mode


Previously, attempting to open a popover over an element inside an
iframe from outside the iframe while in debug mode would crash, because
the prop validation of the popover component expects the target to be an
instance of HTMLElement, but the HTMLElement class instance is not the
same accross frames in firefox.

This commit instead changes the prop validation to instead check that
the target is an instance of either the HTMLElement class instance from
owl's execution context, or an instance of the HTMLElement class
instance of its ownerDocument, which solves the crash.

It is worth noting that proper support for popovers in iframe was added
in 16.3 and above by odoo/odoo#116499 and also ensures proper
positioning of the popover when the iframe is positioned or when it is
scrolled, but backporting this PR is a non-trivial code change and too
risky for stable, as such we only remove the crash, but it's likely that
the popover will be mispositioned in some scenarios.

task-3415762

closes odoo/odoo#132791

Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent 64633946
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment