[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#122119 X-original-commit: ca3d6e09 Signed-off-by:Quentin Smetz (qsm) <qsm@odoo.com> Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
Please register or sign in to comment