jodit 4.13.22 → 4.13.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +11 -4
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +3 -3
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +3 -3
- package/es2021/jodit.js +11 -4
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +11 -4
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +11 -4
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.js +7 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/remove-inv-text-nodes.js +4 -1
- package/package.json +1 -1
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.13.
|
|
6
|
+
export const APP_VERSION = "4.13.23";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -9,7 +9,13 @@ import { Dom } from "../../../../../core/dom/dom.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export function removeEmptyTextNode(jodit, node, hadEffect, arg, argi, currentNode) {
|
|
11
11
|
if (Dom.isText(node) && !node.nodeValue) {
|
|
12
|
-
|
|
12
|
+
// Restore the caret only while the editor owns focus. The walker runs
|
|
13
|
+
// asynchronously, so the user may have already tabbed away — moving the
|
|
14
|
+
// selection here would call `focus()` and steal focus back from the
|
|
15
|
+
// element the user navigated to (e.g. Shift+Tab accessibility flow).
|
|
16
|
+
if (node === currentNode &&
|
|
17
|
+
jodit.s.isFocused() &&
|
|
18
|
+
jodit.s.isCollapsed()) {
|
|
13
19
|
jodit.s.setCursorAfter(node);
|
|
14
20
|
}
|
|
15
21
|
Dom.safeRemove(node);
|
|
@@ -20,7 +20,10 @@ export function removeInvTextNodes(jodit, node, hadEffect, arg, argi, currentNod
|
|
|
20
20
|
return hadEffect;
|
|
21
21
|
}
|
|
22
22
|
node.nodeValue = node.nodeValue.replace(INV_REG(), '');
|
|
23
|
-
|
|
23
|
+
// Same guard as in `removeEmptyTextNode`: the walker is asynchronous, so
|
|
24
|
+
// never move the selection (it re-focuses the editor) once the user has
|
|
25
|
+
// moved focus elsewhere.
|
|
26
|
+
if (node === currentNode && jodit.s.isFocused() && jodit.s.isCollapsed()) {
|
|
24
27
|
jodit.s.setCursorAfter(node);
|
|
25
28
|
}
|
|
26
29
|
if (!node.nodeValue) {
|