Skip to content

Commit 8e5a56a

Browse files
authored
Check if node is single tag element in isNodeEmpty method (#567)
1 parent 518866a commit 8e5a56a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

dist/codex-editor.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codex.editor",
3-
"version": "2.7.11",
3+
"version": "2.7.12",
44
"description": "Codex Editor. Native JS, based on API and Open Source",
55
"main": "dist/codex-editor.js",
66
"types": "./types/index.d.ts",

src/components/dom.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ export default class Dom {
267267
public static isNodeEmpty(node: Node): boolean {
268268
let nodeText;
269269

270+
if (this.isSingleTag(node as HTMLElement)) {
271+
return false;
272+
}
273+
270274
if ( this.isElement(node) && this.isNativeInput(node) ) {
271275
nodeText = (node as HTMLInputElement).value;
272276
} else {

0 commit comments

Comments
 (0)