Check if node is single tag element in isNodeEmpty method (#567)

This commit is contained in:
George Berezhnoy 2018-12-18 22:24:15 +03:00 committed by GitHub
parent 518866a575
commit 8e5a56a67a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

12
dist/codex-editor.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "codex.editor",
"version": "2.7.11",
"version": "2.7.12",
"description": "Codex Editor. Native JS, based on API and Open Source",
"main": "dist/codex-editor.js",
"types": "./types/index.d.ts",

View file

@ -267,6 +267,10 @@ export default class Dom {
public static isNodeEmpty(node: Node): boolean {
let nodeText;
if (this.isSingleTag(node as HTMLElement)) {
return false;
}
if ( this.isElement(node) && this.isNativeInput(node) ) {
nodeText = (node as HTMLInputElement).value;
} else {