Antoine Guenet 0c2015ee0e [FIX] web_editor: prevent closestElement traceback with comment nodes
Comment nodes don't have a `closest` method so when passing one to
`closestElement`, the method crashed.

----

Step to reproduce in website:
- Go to debug mode and to website app
- Click on configuration > websites
- Select a website and in the `custom_code_footer` field add an HTML
  comment
- Go to the website and try to enter edit mode -> Crash

The same error will be visible if you simply enter edit mode and drag &
drop the "Code" snippet and enter an HTML comment inside it.

-----

Step to reproduce in marketing automation:
- Install marketing automation
- Click on a campaign > Add a new activity
- On the mail template field, type something > Create and edit
- Select plain text -> `element.closest is not a function`

----

task-3083797
opw-3081323
opw-3081278

closes odoo/odoo#107486

X-original-commit: 3a9177dd6a6f12f75d0df8146b692e3486f2467c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-08 13:38:17 +01:00
2022-10-06 14:56:52 +02:00
2022-12-08 08:48:48 +01:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%