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.
Files changed (54) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +4 -4
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +3 -3
  5. package/es2015/jodit.js +19 -5
  6. package/es2015/jodit.min.js +3 -3
  7. package/es2015/plugins/debug/debug.css +1 -1
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  13. package/es2018/jodit.fat.min.js +3 -3
  14. package/es2018/jodit.min.js +3 -3
  15. package/es2018/plugins/debug/debug.min.js +1 -1
  16. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  17. package/es2021/jodit.css +1 -1
  18. package/es2021/jodit.fat.min.js +4 -4
  19. package/es2021/jodit.js +19 -5
  20. package/es2021/jodit.min.js +4 -4
  21. package/es2021/plugins/debug/debug.css +1 -1
  22. package/es2021/plugins/debug/debug.js +1 -1
  23. package/es2021/plugins/debug/debug.min.js +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  27. package/es2021.en/jodit.css +1 -1
  28. package/es2021.en/jodit.fat.min.js +4 -4
  29. package/es2021.en/jodit.js +19 -5
  30. package/es2021.en/jodit.min.js +4 -4
  31. package/es2021.en/plugins/debug/debug.css +1 -1
  32. package/es2021.en/plugins/debug/debug.js +1 -1
  33. package/es2021.en/plugins/debug/debug.min.js +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.fat.min.js +2 -2
  39. package/es5/jodit.js +19 -5
  40. package/es5/jodit.min.css +2 -2
  41. package/es5/jodit.min.js +2 -2
  42. package/es5/plugins/debug/debug.css +1 -1
  43. package/es5/plugins/debug/debug.js +1 -1
  44. package/es5/plugins/debug/debug.min.js +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  48. package/es5/polyfills.fat.min.js +1 -1
  49. package/es5/polyfills.js +1 -1
  50. package/es5/polyfills.min.js +1 -1
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/helpers/utils/scroll-into-view.js +6 -2
  53. package/esm/plugins/fullsize/fullsize.js +11 -1
  54. 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.12.38
4
+ * Version: v4.12.39
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2087,7 +2087,7 @@ __webpack_require__.r(__webpack_exports__);
2087
2087
  * @packageDocumentation
2088
2088
  * @module constants
2089
2089
  */
2090
- var APP_VERSION = "4.12.38";
2090
+ var APP_VERSION = "4.12.39";
2091
2091
  // prettier-ignore
2092
2092
  var ES = "es5";
2093
2093
  var IS_ES_MODERN = false;
@@ -10160,8 +10160,12 @@ var map = {};
10160
10160
  return false;
10161
10161
  }
10162
10162
  }
10163
- // Check it's within the document viewport
10164
- return top <= (doc.documentElement && doc.documentElement.clientHeight || 0);
10163
+ // Check it's within the document viewport: the element must not be below
10164
+ // the viewport bottom, and (its bottom) must not be above the viewport top —
10165
+ // the latter guard was missing, so an element scrolled above the top was
10166
+ // wrongly reported as visible and never scrolled to. See #1279
10167
+ var clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
10168
+ return top <= clientHeight && top + height >= 0;
10165
10169
  }
10166
10170
  /**
10167
10171
  * Scroll element into view if it is not in view
@@ -37353,7 +37357,7 @@ var fullsizeStack = new Set();
37353
37357
  editor.registerButton({
37354
37358
  name: 'fullsize'
37355
37359
  });
37356
- var isEnabled = false, oldHeight = 0, oldWidth = 0, wasToggled = false;
37360
+ var isEnabled = false, oldHeight = 0, oldWidth = 0, savedScrollLeft = 0, savedScrollTop = 0, wasToggled = false;
37357
37361
  var resize = function resize() {
37358
37362
  var container = editor.container, events = editor.events;
37359
37363
  if (!events) {
@@ -37402,12 +37406,22 @@ var fullsizeStack = new Set();
37402
37406
  enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
37403
37407
  var shouldToggleGlobalFullsize = editor.o.globalFullSize && (fullsizeStack.size === 1 && enable || fullsizeStack.size === 0 && !enable);
37404
37408
  if (shouldToggleGlobalFullsize) {
37409
+ // Entering fullsize sets `position: fixed` on <html>, which
37410
+ // makes the browser reset the page scroll to the top. Remember
37411
+ // the scroll position so it can be restored on exit (#1255).
37412
+ if (enable) {
37413
+ savedScrollLeft = editor.ow.scrollX;
37414
+ savedScrollTop = editor.ow.scrollY;
37415
+ }
37405
37416
  var node = container.parentNode;
37406
37417
  while(node && node.nodeType !== Node.DOCUMENT_NODE && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE){
37407
37418
  node.classList.toggle('jodit_fullsize-box_true', enable);
37408
37419
  node = node.parentNode;
37409
37420
  }
37410
37421
  resize();
37422
+ if (!enable) {
37423
+ editor.ow.scrollTo(savedScrollLeft, savedScrollTop);
37424
+ }
37411
37425
  }
37412
37426
  events.fire('afterResize');
37413
37427
  };
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.12.38
4
+ * Version: v4.12.39
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.12.38
11
+ * Version: v4.12.39
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */