jodit 4.13.15 → 4.13.16
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 +8 -8
- package/es2015/jodit.js +30 -11
- 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 +30 -11
- 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 +30 -11
- 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 +30 -11
- 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 +18 -7
- package/esm/plugins/enter/helpers/split-fragment.js +11 -2
- package/package.json +1 -1
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.13.
|
|
4
|
+
* Version: v4.13.16
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.13.
|
|
2110
|
+
var APP_VERSION = "4.13.16";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -10173,7 +10173,12 @@ var map = {};
|
|
|
10173
10173
|
while(el && el !== root && el.parentNode){
|
|
10174
10174
|
el = el.parentNode;
|
|
10175
10175
|
rect = el.getBoundingClientRect();
|
|
10176
|
-
|
|
10176
|
+
// The element's bottom is clipped by the container's bottom edge: a
|
|
10177
|
+
// caret sitting on that line is invisible, so the element is not in
|
|
10178
|
+
// view even though its top still fits. The `top > rect.top` guard keeps
|
|
10179
|
+
// elements taller than the container (which can never fully fit) from
|
|
10180
|
+
// being treated as always out of view. See #1300
|
|
10181
|
+
if (top + height > rect.bottom && top > rect.top) {
|
|
10177
10182
|
return false;
|
|
10178
10183
|
}
|
|
10179
10184
|
// Check if the element is out of view due to a container scrolling
|
|
@@ -10181,19 +10186,24 @@ var map = {};
|
|
|
10181
10186
|
return false;
|
|
10182
10187
|
}
|
|
10183
10188
|
}
|
|
10184
|
-
// Check it's within the document viewport: the element must
|
|
10185
|
-
//
|
|
10186
|
-
// the latter guard was missing, so an
|
|
10187
|
-
// wrongly reported as visible and never
|
|
10189
|
+
// Check it's within the document viewport: the element must fit above the
|
|
10190
|
+
// viewport bottom (same clipped-bottom rule as above), and its bottom must
|
|
10191
|
+
// not be above the viewport top — the latter guard was missing, so an
|
|
10192
|
+
// element scrolled above the top was wrongly reported as visible and never
|
|
10193
|
+
// scrolled to. See #1279
|
|
10188
10194
|
var clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
|
|
10189
|
-
return top <= clientHeight && top + height >= 0;
|
|
10195
|
+
return (top + height <= clientHeight || top <= 0) && top + height >= 0;
|
|
10190
10196
|
}
|
|
10191
10197
|
/**
|
|
10192
10198
|
* Scroll element into view if it is not in view
|
|
10193
10199
|
*/ function scrollIntoViewIfNeeded(elm, root, doc) {
|
|
10194
10200
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm) && !inView(elm, root, doc)) {
|
|
10195
10201
|
if (root.clientHeight !== root.scrollHeight) {
|
|
10196
|
-
|
|
10202
|
+
// Scroll the minimal distance: when the element is below the
|
|
10203
|
+
// visible area align it to the bottom (natural typing flow),
|
|
10204
|
+
// otherwise align it to the top. See #1300
|
|
10205
|
+
var alignBottom = elm.offsetTop + elm.offsetHeight - root.clientHeight;
|
|
10206
|
+
root.scrollTop = root.scrollTop < alignBottom ? alignBottom : elm.offsetTop;
|
|
10197
10207
|
}
|
|
10198
10208
|
if (!inView(elm, root, doc)) {
|
|
10199
10209
|
elm.scrollIntoView();
|
|
@@ -37062,8 +37072,17 @@ function brBefore(start) {
|
|
|
37062
37072
|
}
|
|
37063
37073
|
return;
|
|
37064
37074
|
}
|
|
37065
|
-
|
|
37066
|
-
|
|
37075
|
+
// Inserting the left half above the caret can trigger the browser's
|
|
37076
|
+
// scroll anchoring and shift the visible area — keep it stable. See #1300
|
|
37077
|
+
var scrollTop = jodit.editor.scrollTop;
|
|
37078
|
+
sel.splitSelection(block, fake);
|
|
37079
|
+
if (jodit.editor.scrollTop !== scrollTop) {
|
|
37080
|
+
jodit.editor.scrollTop = scrollTop;
|
|
37081
|
+
}
|
|
37082
|
+
// After the split the caret stays inside `block` (the right half) —
|
|
37083
|
+
// `splitSelection` returns the left half, which is above the caret and
|
|
37084
|
+
// usually already visible. Follow the caret, not the left half. See #1300
|
|
37085
|
+
(0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(block, jodit.editor, jodit.ed);
|
|
37067
37086
|
}
|
|
37068
37087
|
|
|
37069
37088
|
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.13.
|
|
4
|
+
* Version: v4.13.16
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.13.
|
|
11
|
+
* Version: v4.13.16
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|