From 841d9eaf400cb149c93babc8ccc02632bf67cef6 Mon Sep 17 00:00:00 2001 From: "Rodopho Cammarosano de Lima (rcdl)" Date: Thu, 26 Jan 2023 11:46:05 +0000 Subject: [PATCH] [REM] web_editor: remove unused method _isSelectionOnlyZws The forementioned method is not called anywhere in the code. closes odoo/odoo#111131 Related: odoo/enterprise#36356 Signed-off-by: David Monjoie (dmo) --- .../src/js/editor/odoo-editor/src/OdooEditor.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js index 37eed349ea9..4c399d37f58 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js @@ -3645,21 +3645,6 @@ export class OdooEditor extends EventTarget { } } - /** - * Returns true if the current selection content is only one ZWS - * - * @private - * @param {Object} selection - * @returns {boolean} - */ - _isSelectionOnlyZws(selection) { - let range = selection.getRangeAt(0); - if (selection.isCollapsed || !range) { - return false; - } - return range.cloneContents().textContent === '\u200B'; - } - getCurrentCollaborativeSelection() { const selection = this._latestComputedSelection || this._computeHistorySelection(); if (!selection) return;