jodit 4.12.38 → 4.12.39
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 +14 -1
- package/README.md +4 -4
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +19 -5
- 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 +4 -4
- package/es2021/jodit.js +19 -5
- package/es2021/jodit.min.js +4 -4
- 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 +4 -4
- package/es2021.en/jodit.js +19 -5
- package/es2021.en/jodit.min.js +4 -4
- 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 +19 -5
- 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/core/helpers/utils/scroll-into-view.js +6 -2
- package/esm/plugins/fullsize/fullsize.js +11 -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.12.
|
|
6
|
+
export const APP_VERSION = "4.12.39";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -24,8 +24,12 @@ export function inView(elm, root, doc) {
|
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
// Check it's within the document viewport
|
|
28
|
-
|
|
27
|
+
// Check it's within the document viewport: the element must not be below
|
|
28
|
+
// the viewport bottom, and (its bottom) must not be above the viewport top —
|
|
29
|
+
// the latter guard was missing, so an element scrolled above the top was
|
|
30
|
+
// wrongly reported as visible and never scrolled to. See #1279
|
|
31
|
+
const clientHeight = (doc.documentElement && doc.documentElement.clientHeight) || 0;
|
|
32
|
+
return top <= clientHeight && top + height >= 0;
|
|
29
33
|
}
|
|
30
34
|
/**
|
|
31
35
|
* Scroll element into view if it is not in view
|
|
@@ -15,7 +15,7 @@ export function fullsize(editor) {
|
|
|
15
15
|
editor.registerButton({
|
|
16
16
|
name: 'fullsize'
|
|
17
17
|
});
|
|
18
|
-
let isEnabled = false, oldHeight = 0, oldWidth = 0, wasToggled = false;
|
|
18
|
+
let isEnabled = false, oldHeight = 0, oldWidth = 0, savedScrollLeft = 0, savedScrollTop = 0, wasToggled = false;
|
|
19
19
|
const resize = () => {
|
|
20
20
|
const { container, events } = editor;
|
|
21
21
|
if (!events) {
|
|
@@ -72,6 +72,13 @@ export function fullsize(editor) {
|
|
|
72
72
|
((fullsizeStack.size === 1 && enable) ||
|
|
73
73
|
(fullsizeStack.size === 0 && !enable));
|
|
74
74
|
if (shouldToggleGlobalFullsize) {
|
|
75
|
+
// Entering fullsize sets `position: fixed` on <html>, which
|
|
76
|
+
// makes the browser reset the page scroll to the top. Remember
|
|
77
|
+
// the scroll position so it can be restored on exit (#1255).
|
|
78
|
+
if (enable) {
|
|
79
|
+
savedScrollLeft = editor.ow.scrollX;
|
|
80
|
+
savedScrollTop = editor.ow.scrollY;
|
|
81
|
+
}
|
|
75
82
|
let node = container.parentNode;
|
|
76
83
|
while (node &&
|
|
77
84
|
node.nodeType !== Node.DOCUMENT_NODE &&
|
|
@@ -80,6 +87,9 @@ export function fullsize(editor) {
|
|
|
80
87
|
node = node.parentNode;
|
|
81
88
|
}
|
|
82
89
|
resize();
|
|
90
|
+
if (!enable) {
|
|
91
|
+
editor.ow.scrollTo(savedScrollLeft, savedScrollTop);
|
|
92
|
+
}
|
|
83
93
|
}
|
|
84
94
|
events.fire('afterResize');
|
|
85
95
|
};
|