[FIX] web_editor: ensure _makeHint receives an element
Make a hint in the editor only if the first element is an element, otherwise the method `_makeHint` would crash. task-2898432 Part-of: odoo/odoo#94875
This commit is contained in:
@@ -3372,7 +3372,7 @@ export class OdooEditor extends EventTarget {
|
||||
}
|
||||
|
||||
// placeholder hint
|
||||
if (this.editable.textContent === '' && this.options.placeholder) {
|
||||
if (this.editable.textContent === '' && this.options.placeholder && this.editable.firstChild.innerHTML) {
|
||||
this._makeHint(this.editable.firstChild, this.options.placeholder, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user