mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 10:50:23 +02:00
Check if node is single tag element in isNodeEmpty method (#567)
This commit is contained in:
parent
518866a575
commit
8e5a56a67a
12
dist/codex-editor.js
vendored
12
dist/codex-editor.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "codex.editor",
|
"name": "codex.editor",
|
||||||
"version": "2.7.11",
|
"version": "2.7.12",
|
||||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||||
"main": "dist/codex-editor.js",
|
"main": "dist/codex-editor.js",
|
||||||
"types": "./types/index.d.ts",
|
"types": "./types/index.d.ts",
|
||||||
|
|
|
@ -267,6 +267,10 @@ export default class Dom {
|
||||||
public static isNodeEmpty(node: Node): boolean {
|
public static isNodeEmpty(node: Node): boolean {
|
||||||
let nodeText;
|
let nodeText;
|
||||||
|
|
||||||
|
if (this.isSingleTag(node as HTMLElement)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( this.isElement(node) && this.isNativeInput(node) ) {
|
if ( this.isElement(node) && this.isNativeInput(node) ) {
|
||||||
nodeText = (node as HTMLInputElement).value;
|
nodeText = (node as HTMLInputElement).value;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue