Skip to content
Snippets Groups Projects
Commit ca3d6e09 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] website: correctly target footer on popup options


The code was assuming there would be only one `<footer/>` element in the
dom but it's not always true.
Our `Blockquote` snippet also contains a `<footer/>` element.

While this has no impact on Odoo 14 and Odoo 15, it will crash in Odoo
16 when trying to select "On all pages" on a popup option when there is
a blockquote snippet on a page.
The reason it breaks in 16 is because it uses javascript instead of
jquery, finding only one element (the footer of the blockquote) and not
all. The jQuery usage was then filtering out to only keep the correct
footer due to some extra selector looked for in the elements
(`.oe_structure:o_editable`).

Still, the fix is made in Odoo 14 because it's likely that we will have
another fix later in the snippet options, and it's also likely that
someone will replace the jQuery usage by javascript while doing so,
which would reveal the bug.

opw-3283140

closes odoo/odoo#121848

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 56a1759e
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