-
- Downloads
[FIX] web_editor: fix ClipboardJS traceback in Firefox 109
Starting with Firefox 109, a widget element prototype that is put inside an iframe will not be instanceof its original constructor. See: https://github.com/webcompat/web-bugs/issues/118350 This is because a node that is adopted by an iframe will have its prototype changed to match the constructor from within the iframe instead of its original one. This has been the case for a long time. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1470017 It largely went unnoticed because of another quirk of Firefox related to the use of instanceof which was fixed in version 109. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1360715 Since this bug was fixed it became apparent, in the form of a traceback, that the wrong instance of ClipboardJS was being used in the case of Firefox, due to the forced prototype change. This commit could be reverted once Firefox is fixed. Steps to reproduce the issue in Firefox > 109: - Create a new mass mailing. - Choose the third template with "Thank you for joining us!". - Click on the "LOGIN" button link inside the email. - Get a traceback about a paremeter not being the right type. Task-3186513 OPW-3172914 closes odoo/odoo#120003 Signed-off-by:David Monjoie (dmo) <dmo@odoo.com> Co-authored-by:
Jinjiu Liu <jili@odoo.com> Co-authored-by:
David Monjoie <dmo@odoo.com>
Loading