jodit 4.12.38 → 4.12.41

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 (65) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +4 -4
  3. package/es2015/jodit.css +13 -1
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +4 -4
  6. package/es2015/jodit.js +26 -9
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +4 -4
  9. package/es2015/plugins/debug/debug.css +1 -1
  10. package/es2015/plugins/debug/debug.js +1 -1
  11. package/es2015/plugins/debug/debug.min.js +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  14. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +4 -4
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +4 -4
  19. package/es2018/plugins/debug/debug.min.js +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  21. package/es2021/jodit.css +13 -1
  22. package/es2021/jodit.fat.min.css +1 -1
  23. package/es2021/jodit.fat.min.js +5 -5
  24. package/es2021/jodit.js +26 -9
  25. package/es2021/jodit.min.css +1 -1
  26. package/es2021/jodit.min.js +5 -5
  27. package/es2021/plugins/debug/debug.css +1 -1
  28. package/es2021/plugins/debug/debug.js +1 -1
  29. package/es2021/plugins/debug/debug.min.js +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  32. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  33. package/es2021.en/jodit.css +13 -1
  34. package/es2021.en/jodit.fat.min.css +1 -1
  35. package/es2021.en/jodit.fat.min.js +5 -5
  36. package/es2021.en/jodit.js +26 -9
  37. package/es2021.en/jodit.min.css +1 -1
  38. package/es2021.en/jodit.min.js +5 -5
  39. package/es2021.en/plugins/debug/debug.css +1 -1
  40. package/es2021.en/plugins/debug/debug.js +1 -1
  41. package/es2021.en/plugins/debug/debug.min.js +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  45. package/es5/jodit.css +18 -2
  46. package/es5/jodit.fat.min.css +1 -1
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +26 -10
  49. package/es5/jodit.min.css +3 -3
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/es5/polyfills.fat.min.js +1 -1
  58. package/es5/polyfills.js +1 -1
  59. package/es5/polyfills.min.js +1 -1
  60. package/esm/core/constants.js +1 -1
  61. package/esm/core/helpers/utils/scroll-into-view.js +6 -2
  62. package/esm/modules/widget/file-selector/file-selector.js +7 -1
  63. package/esm/modules/widget/tabs/tabs.js +0 -3
  64. package/esm/plugins/fullsize/fullsize.js +11 -1
  65. package/package.json +1 -1
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.38";
6
+ export const APP_VERSION = "4.12.41";
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
- return (top <= ((doc.documentElement && doc.documentElement.clientHeight) || 0));
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
@@ -107,7 +107,13 @@ export const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true
107
107
  content: form.container
108
108
  });
109
109
  }
110
- return TabsWidget(editor, tabs);
110
+ const box = TabsWidget(editor, tabs);
111
+ // Marks this popup so its tabs auto-size to their labels (see
112
+ // `.jodit-file-selector` in tabs.less) — long localized tab captions are no
113
+ // longer clipped — while leaving other tab popups (link, video …)
114
+ // untouched.
115
+ box.classList.add('jodit-file-selector');
116
+ return box;
111
117
  };
112
118
  function val(elm, selector, value) {
113
119
  const child = elm.querySelector(selector);
@@ -99,9 +99,6 @@ export const TabsWidget = (jodit, tabs, state) => {
99
99
  tab
100
100
  };
101
101
  });
102
- Object.values(nameToTab).forEach(({ button }) => {
103
- button.container.style.width = (100 / tabs.length).toFixed(10) + '%';
104
- });
105
102
  const tab = !state || !state.activeTab || !nameToTab[state.activeTab]
106
103
  ? firstTab
107
104
  : state.activeTab;
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.12.38",
3
+ "version": "4.12.41",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",