mirror of
https://github.com/codex-team/editor.js
synced 2024-06-18 13:45:20 +02:00
Polifylls Element interface type fixes and Selection util rangeCount extra condition (#555)
* hotfix * update
This commit is contained in:
parent
0ad9484c75
commit
3d512d66ff
6
dist/codex-editor.js
vendored
6
dist/codex-editor.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codex.editor",
|
||||
"version": "2.7.7",
|
||||
"version": "2.7.8",
|
||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||
"main": "dist/codex-editor.js",
|
||||
"types": "./types/index.d.ts",
|
||||
|
|
|
@ -9,8 +9,8 @@ interface Element {
|
|||
msMatchesSelector: (selector: string) => boolean;
|
||||
oMatchesSelector: (selector: string) => boolean;
|
||||
|
||||
prepend: (nodes: Node|Node[]|DocumentFragment) => void;
|
||||
append: (nodes: Node|Node[]|DocumentFragment) => void;
|
||||
prepend: (...nodes: Array<string | Node>) => void;
|
||||
append: (...nodes: Array<string | Node>) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -146,7 +146,7 @@ export default class SelectionUtils {
|
|||
|
||||
sel = window.getSelection();
|
||||
|
||||
if (!isNaN(sel.rangeCount)) {
|
||||
if (sel.rangeCount === null || isNaN(sel.rangeCount)) {
|
||||
_.log('Method SelectionUtils.rangeCount is not supported', 'warn');
|
||||
return rect;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue