jodit-pro-react 5.5.89 → 5.5.91

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-DSSDVQ4A.mjs";
3
+ } from "./chunk-UB64A3HC.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.13.25";
196
+ APP_VERSION = "4.13.27";
197
197
  ES = "es2020";
198
198
  IS_ES_MODERN = true;
199
199
  IS_ES_NEXT = true;
@@ -9133,6 +9133,10 @@ var Popup = class _Popup extends UIGroup {
9133
9133
  this.j.e.fire(this, "beforeClose");
9134
9134
  this.j.e.fire("beforePopupClose", this);
9135
9135
  this.__removeGlobalListeners();
9136
+ const { activeElement } = this.od;
9137
+ if (activeElement && activeElement !== this.container && Dom.isOrContains(this.container, activeElement) && isFunction(activeElement.blur)) {
9138
+ activeElement.blur();
9139
+ }
9136
9140
  Dom.safeRemove(this.container);
9137
9141
  return this;
9138
9142
  }
@@ -16201,15 +16205,17 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
16201
16205
  return this.openedPopup;
16202
16206
  }
16203
16207
  __closePopup() {
16204
- if (this.openedPopup) {
16205
- this.j.e.off(this.ow, "mousedown touchstart", this.onOutsideClick).off("escape closeAllPopups", this.onOutsideClick);
16206
- this.state.activated = false;
16207
- this.openedPopup.close();
16208
- this.openedPopup.destruct();
16209
- this.openedPopup = null;
16210
- if (this.trigger) {
16211
- attr(this.trigger, "aria-expanded", false);
16212
- }
16208
+ const popup = this.openedPopup;
16209
+ if (!popup) {
16210
+ return;
16211
+ }
16212
+ this.openedPopup = null;
16213
+ this.j.e.off(this.ow, "mousedown touchstart", this.onOutsideClick).off("escape closeAllPopups", this.onOutsideClick);
16214
+ this.state.activated = false;
16215
+ popup.close();
16216
+ popup.destruct();
16217
+ if (this.trigger) {
16218
+ attr(this.trigger, "aria-expanded", false);
16213
16219
  }
16214
16220
  }
16215
16221
  /**
@@ -17341,6 +17347,7 @@ function getSuitChild(style, font2) {
17341
17347
  // node_modules/jodit/esm/core/selection/style/api/get-suit-parent.js
17342
17348
  init_dom();
17343
17349
  function getSuitParent(style, node, root) {
17350
+ var _a2;
17344
17351
  const { parentNode } = node;
17345
17352
  if (parentNode === root || !Dom.isHTMLElement(parentNode) || Dom.next(node, isNormalNode, parentNode) || Dom.prev(node, isNormalNode, parentNode)) {
17346
17353
  return null;
@@ -17348,6 +17355,9 @@ function getSuitParent(style, node, root) {
17348
17355
  if (style.isElementCommit && style.elementIsBlock && !Dom.isBlock(parentNode)) {
17349
17356
  return getSuitParent(style, parentNode, root);
17350
17357
  }
17358
+ if (Dom.isTag(parentNode, "li") && !style.isElementCommit && ((_a2 = style.options.attributes) === null || _a2 === void 0 ? void 0 : _a2.style)) {
17359
+ return parentNode;
17360
+ }
17351
17361
  if (isSuitElement(style, parentNode, false) && (!Dom.isBlock(parentNode) || style.elementIsBlock)) {
17352
17362
  return parentNode;
17353
17363
  }
@@ -21007,8 +21017,12 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
21007
21017
  const { extra } = refs(form2);
21008
21018
  extra.appendChild(editor.c.fromHTML(`<div class="${cn}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${valueHex || ""}"/></div>`));
21009
21019
  const { hexInput } = refs(form2);
21020
+ let appliedHexValue = null;
21010
21021
  const applyHexInput = () => {
21011
21022
  const raw = hexInput.value.trim();
21023
+ if (raw === appliedHexValue) {
21024
+ return;
21025
+ }
21012
21026
  const isHex = /^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(raw);
21013
21027
  const isRgb = /^rgba?\([\d\s.,%]+\)$/i.test(raw);
21014
21028
  if (!isHex && !isRgb) {
@@ -21016,6 +21030,7 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
21016
21030
  }
21017
21031
  const color2 = normalizeColor(isHex && !raw.startsWith("#") ? "#" + raw : raw);
21018
21032
  if (color2 && isFunction(callback)) {
21033
+ appliedHexValue = raw;
21019
21034
  callback(color2);
21020
21035
  }
21021
21036
  };
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  JoditEditor_default,
4
4
  n
5
- } from "./chunk-DSSDVQ4A.mjs";
5
+ } from "./chunk-UB64A3HC.mjs";
6
6
 
7
7
  // src/index.ts
8
8
  var index_default = JoditEditor_default;