jodit-pro-react 5.5.53 → 5.5.54

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JoditEditor_default
3
- } from "./chunk-TE7OPFFK.mjs";
3
+ } from "./chunk-7DUORNPW.mjs";
4
4
  export {
5
5
  JoditEditor_default as default
6
6
  };
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
193
193
  var init_constants = __esm({
194
194
  "node_modules/jodit/esm/core/constants.js"() {
195
195
  "use strict";
196
- APP_VERSION = "4.12.38";
196
+ APP_VERSION = "4.12.39";
197
197
  ES = "es2020";
198
198
  IS_ES_MODERN = true;
199
199
  IS_ES_NEXT = true;
@@ -4309,7 +4309,8 @@ function inView(elm, root, doc) {
4309
4309
  return false;
4310
4310
  }
4311
4311
  }
4312
- return top <= (doc.documentElement && doc.documentElement.clientHeight || 0);
4312
+ const clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
4313
+ return top <= clientHeight && top + height >= 0;
4313
4314
  }
4314
4315
  function scrollIntoViewIfNeeded(elm, root, doc) {
4315
4316
  if (Dom.isHTMLElement(elm) && !inView(elm, root, doc)) {
@@ -22470,7 +22471,7 @@ function fullsize(editor) {
22470
22471
  editor.registerButton({
22471
22472
  name: "fullsize"
22472
22473
  });
22473
- let isEnabled = false, oldHeight = 0, oldWidth = 0, wasToggled = false;
22474
+ let isEnabled = false, oldHeight = 0, oldWidth = 0, savedScrollLeft = 0, savedScrollTop = 0, wasToggled = false;
22474
22475
  const resize2 = () => {
22475
22476
  const { container, events } = editor;
22476
22477
  if (!events) {
@@ -22513,12 +22514,19 @@ function fullsize(editor) {
22513
22514
  enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
22514
22515
  const shouldToggleGlobalFullsize = editor.o.globalFullSize && (fullsizeStack.size === 1 && enable || fullsizeStack.size === 0 && !enable);
22515
22516
  if (shouldToggleGlobalFullsize) {
22517
+ if (enable) {
22518
+ savedScrollLeft = editor.ow.scrollX;
22519
+ savedScrollTop = editor.ow.scrollY;
22520
+ }
22516
22521
  let node = container.parentNode;
22517
22522
  while (node && node.nodeType !== Node.DOCUMENT_NODE && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
22518
22523
  node.classList.toggle("jodit_fullsize-box_true", enable);
22519
22524
  node = node.parentNode;
22520
22525
  }
22521
22526
  resize2();
22527
+ if (!enable) {
22528
+ editor.ow.scrollTo(savedScrollLeft, savedScrollTop);
22529
+ }
22522
22530
  }
22523
22531
  events.fire("afterResize");
22524
22532
  };
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  JoditEditor_default,
4
4
  n
5
- } from "./chunk-TE7OPFFK.mjs";
5
+ } from "./chunk-7DUORNPW.mjs";
6
6
 
7
7
  // src/index.ts
8
8
  var index_default = JoditEditor_default;