diff --git a/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js
index 3a3f1ffd058..fc010a610b2 100644
--- a/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js
+++ b/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js
@@ -1791,7 +1791,7 @@ export class OdooEditor extends EventTarget {
}
stepIndex--;
}
- };
+ }
// TOOLBAR
// =======
diff --git a/addons/web_editor/static/lib/odoo-editor/src/utils/sanitize.js b/addons/web_editor/static/lib/odoo-editor/src/utils/sanitize.js
index f4b5db5e9b1..afac7471c29 100644
--- a/addons/web_editor/static/lib/odoo-editor/src/utils/sanitize.js
+++ b/addons/web_editor/static/lib/odoo-editor/src/utils/sanitize.js
@@ -13,6 +13,7 @@ import {
isMediaElement,
getDeepRange,
isUnbreakable,
+ isUnremovable
} from './utils.js';
const NOT_A_NUMBER = /[^\d]/g;
@@ -51,11 +52,11 @@ export function areSimilarElements(node, node2) {
) {
return false;
}
- if (node.tagName == 'LI' && node.classList.contains('oe-nested')) {
+ if (node.tagName === 'LI' && node.classList.contains('oe-nested')) {
return (
node.lastElementChild &&
node2.firstElementChild &&
- getListMode(node.lastElementChild) == getListMode(node2.firstElementChild)
+ getListMode(node.lastElementChild) === getListMode(node2.firstElementChild)
);
}
if (['UL', 'OL'].includes(node.tagName)) {
@@ -113,7 +114,7 @@ class Sanitize {
}
// Remove empty blocks in
- if (node.nodeName == 'P' && node.parentElement.tagName == 'LI') {
+ if (node.nodeName === 'P' && node.parentElement.tagName === 'LI') {
const next = node.nextSibling;
const pnode = node.parentElement;
if (isEmptyBlock(node)) {
diff --git a/addons/web_editor/static/lib/odoo-editor/src/utils/utils.js b/addons/web_editor/static/lib/odoo-editor/src/utils/utils.js
index 0b590deef12..79269a6dbb9 100644
--- a/addons/web_editor/static/lib/odoo-editor/src/utils/utils.js
+++ b/addons/web_editor/static/lib/odoo-editor/src/utils/utils.js
@@ -1096,6 +1096,7 @@ export function isContentTextNode(node) {
* will always return 'true' while it is sometimes invisible.
*
* @param {Node} node
+ * @param {boolean} areBlocksAlwaysVisible
* @returns {boolean}
*/
export function isVisible(node, areBlocksAlwaysVisible = true) {
@@ -1459,7 +1460,7 @@ export function clearEmpty(node) {
}
export function setTagName(el, newTagName) {
- if (el.tagName == newTagName) {
+ if (el.tagName === newTagName) {
return el;
}
var n = document.createElement(newTagName);
@@ -1598,6 +1599,7 @@ export function prepareUpdate(...args) {
* @param {HTMLElement} el
* @param {number} offset
* @param {number} direction @see DIRECTIONS.LEFT @see DIRECTIONS.RIGHT
+ * @param {CTYPES} leftCType
* @returns {Object}
*/
export function getState(el, offset, direction, leftCType) {
diff --git a/addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js b/addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js
index fe9efdebfb3..8efb6732c03 100644
--- a/addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js
+++ b/addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js
@@ -2251,7 +2251,7 @@ X[]
it('should insert line breaks outside the edges of an anchor', async () => {
const pressEnter = editor => {
editor.document.execCommand('insertParagraph');
- }
+ };
await testEditor(BasicEditor, {
contentBefore: '',
stepFunction: pressEnter,
@@ -2729,7 +2729,7 @@ X[]
contentAfter: 'a[bc]def
',
});
});
- })
+ });
describe('setTagName', () => {
describe('to paragraph', () => {