jodit 4.18.6 → 4.18.7

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 (68) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +8 -8
  4. package/es2015/jodit.js +103 -22
  5. package/es2015/jodit.min.js +8 -8
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +6 -6
  13. package/es2018/jodit.min.js +6 -6
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +6 -6
  18. package/es2021/jodit.js +102 -22
  19. package/es2021/jodit.min.js +6 -6
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +10 -10
  28. package/es2021.en/jodit.js +102 -22
  29. package/es2021.en/jodit.min.js +6 -6
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +110 -21
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +2 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/decorators/component/component.js +12 -0
  53. package/esm/core/ui/popup/popup.js +14 -9
  54. package/esm/jodit.js +5 -1
  55. package/esm/modules/file-browser/ui/files/files.js +17 -2
  56. package/esm/modules/file-browser/ui/tree/tree.js +17 -2
  57. package/esm/plugins/backspace/cases/check-remove-char.d.ts +2 -1
  58. package/esm/plugins/backspace/cases/check-remove-char.js +25 -4
  59. package/esm/plugins/backspace/config.d.ts +2 -0
  60. package/esm/plugins/backspace/config.js +6 -3
  61. package/esm/plugins/image-properties/image-properties.d.ts +5 -0
  62. package/esm/plugins/image-properties/image-properties.js +30 -5
  63. package/esm/plugins/mobile/mobile.js +7 -4
  64. package/package.json +1 -1
  65. package/types/config.d.ts +2 -0
  66. package/types/plugins/backspace/cases/check-remove-char.d.ts +2 -1
  67. package/types/plugins/backspace/config.d.ts +2 -0
  68. package/types/plugins/image-properties/image-properties.d.ts +5 -0
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.18.6
4
+ * Version: v4.18.7
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2152,7 +2152,7 @@ __webpack_require__.r(__webpack_exports__);
2152
2152
  * @packageDocumentation
2153
2153
  * @module constants
2154
2154
  */
2155
- var APP_VERSION = "4.18.6";
2155
+ var APP_VERSION = "4.18.7";
2156
2156
  // prettier-ignore
2157
2157
  var ES = "es5";
2158
2158
  var IS_ES_MODERN = false;
@@ -2893,6 +2893,8 @@ function cacheHTML(target, _, descriptor) {
2893
2893
 
2894
2894
 
2895
2895
  var componentRegistry = new Map();
2896
+ var decoratedClasses = new WeakSet();
2897
+ var warnedClasses = new WeakSet();
2896
2898
  /**
2897
2899
  * Decorate components and set status isReady after constructor
2898
2900
  * @param constructorFunction - Component constructor class
@@ -2916,11 +2918,18 @@ var componentRegistry = new Map();
2916
2918
  Object.setPrototypeOf(_this, newConstructorFunction.prototype);
2917
2919
  }
2918
2920
  _this.setStatus('ready');
2921
+ } else if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.IS_PROD && !decoratedClasses.has(_this.constructor) && !warnedClasses.has(_this.constructor)) {
2922
+ // Only the outermost class's decorator sets `ready`, so a subclass
2923
+ // without its own decorator stays in `beforeInit`. See #1685
2924
+ warnedClasses.add(_this.constructor);
2925
+ console.warn('Component "'.concat(_this.constructor.name || (0,jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_6__.getClassName)(_this), '" extends a @component class without being decorated itself, so it never becomes ready and its @watch, @debounce, @throttle and @hook handlers never run'));
2919
2926
  }
2920
2927
  return _this;
2921
2928
  }
2922
2929
  return newConstructorFunction;
2923
2930
  }(constructorFunction);
2931
+ decoratedClasses.add(constructorFunction);
2932
+ decoratedClasses.add(newConstructorFunction);
2924
2933
  var name = (0,jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_6__.getClassName)(constructorFunction.prototype);
2925
2934
  if (componentRegistry.has(name) && !jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.IS_PROD) {
2926
2935
  throw new Error('Component with name "'.concat(name, '" is already registered'));
@@ -21249,6 +21258,9 @@ var Popup = /*#__PURE__*/ function(UIGroup) {
21249
21258
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
21250
21259
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_12__.autobind
21251
21260
  ], Popup.prototype, "__closeOnOutsideClick", null);
21261
+ Popup = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
21262
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_12__.component
21263
+ ], Popup);
21252
21264
 
21253
21265
 
21254
21266
  /***/ }),
@@ -22707,7 +22719,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
22707
22719
  commands.push(command);
22708
22720
  if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isFunction)(command)) {
22709
22721
  var hotkeys = this.o.commandToHotkeys[commandName] || this.o.commandToHotkeys[commandNameOriginal] || command.hotkeys;
22710
- if (hotkeys) {
22722
+ if (hotkeys && hotkeys.length) {
22711
22723
  this.registerHotkeyToCommand(hotkeys, commandName, options === null || options === void 0 ? void 0 : options.stopPropagation);
22712
22724
  }
22713
22725
  }
@@ -22721,6 +22733,10 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
22721
22733
  value: function registerHotkeyToCommand(hotkeys, commandName) {
22722
22734
  var _this = this;
22723
22735
  var shouldStop = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
22736
+ // An empty list (e.g. `commandToHotkeys: { cmd: [] }`) turns the key off
22737
+ if (!hotkeys || !hotkeys.length) {
22738
+ return;
22739
+ }
22724
22740
  var shortcuts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.asArray)(hotkeys).map(jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.normalizeKeyAliases).map(function(hotkey) {
22725
22741
  return hotkey + '.hotkey';
22726
22742
  }).join(' ');
@@ -27302,7 +27318,10 @@ var DEFAULT_SOURCE_NAME = 'default';
27302
27318
  /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
27303
27319
  /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
27304
27320
  /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34918);
27305
- /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4099);
27321
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
27322
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84839);
27323
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4099);
27324
+
27306
27325
 
27307
27326
 
27308
27327
 
@@ -27313,6 +27332,7 @@ var DEFAULT_SOURCE_NAME = 'default';
27313
27332
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27314
27333
  */
27315
27334
 
27335
+
27316
27336
  var FileBrowserFiles = /*#__PURE__*/ function(UIGroup) {
27317
27337
  "use strict";
27318
27338
  (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__._)(FileBrowserFiles, UIGroup);
@@ -27329,7 +27349,10 @@ var FileBrowserFiles = /*#__PURE__*/ function(UIGroup) {
27329
27349
  }
27330
27350
  ]);
27331
27351
  return FileBrowserFiles;
27332
- }(jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIGroup);
27352
+ }(jodit_core_ui__WEBPACK_IMPORTED_MODULE_6__.UIGroup);
27353
+ FileBrowserFiles = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
27354
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.component
27355
+ ], FileBrowserFiles);
27333
27356
 
27334
27357
 
27335
27358
  /***/ }),
@@ -27367,7 +27390,10 @@ var FileBrowserFiles = /*#__PURE__*/ function(UIGroup) {
27367
27390
  /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
27368
27391
  /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
27369
27392
  /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34918);
27370
- /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4099);
27393
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
27394
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84839);
27395
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4099);
27396
+
27371
27397
 
27372
27398
 
27373
27399
 
@@ -27378,6 +27404,7 @@ var FileBrowserFiles = /*#__PURE__*/ function(UIGroup) {
27378
27404
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27379
27405
  */
27380
27406
 
27407
+
27381
27408
  var FileBrowserTree = /*#__PURE__*/ function(UIGroup) {
27382
27409
  "use strict";
27383
27410
  (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__._)(FileBrowserTree, UIGroup);
@@ -27394,7 +27421,10 @@ var FileBrowserTree = /*#__PURE__*/ function(UIGroup) {
27394
27421
  }
27395
27422
  ]);
27396
27423
  return FileBrowserTree;
27397
- }(jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIGroup);
27424
+ }(jodit_core_ui__WEBPACK_IMPORTED_MODULE_6__.UIGroup);
27425
+ FileBrowserTree = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
27426
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.component
27427
+ ], FileBrowserTree);
27398
27428
 
27399
27429
 
27400
27430
  /***/ }),
@@ -34362,9 +34392,11 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
34362
34392
  * ```html
34363
34393
  * t|st
34364
34394
  * ```
34395
+ * With `stopBeforeSpace`, nothing is removed when the next char is a space.
34365
34396
  * @private
34366
34397
  */ // eslint-disable-next-line complexity
34367
34398
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
34399
+ var stopBeforeSpace = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
34368
34400
  var step = backspace ? -1 : 1;
34369
34401
  var anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(fakeNode, !backspace);
34370
34402
  var sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(fakeNode, backspace);
@@ -34383,6 +34415,9 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
34383
34415
  break;
34384
34416
  }
34385
34417
  if ((_sibling_nodeValue = sibling.nodeValue) === null || _sibling_nodeValue === void 0 ? void 0 : _sibling_nodeValue.length) {
34418
+ if (stopBeforeSpace && isSpace(nextChar(sibling.nodeValue, backspace))) {
34419
+ break;
34420
+ }
34386
34421
  removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
34387
34422
  if (!sibling.nodeValue.length && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(sibling.parentNode)) {
34388
34423
  sibling.nodeValue = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
@@ -34490,10 +34525,26 @@ function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
34490
34525
  }
34491
34526
  function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
34492
34527
  ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.before, sibling, fakeNode);
34493
- if (mode === 'sentence' || mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
34494
- checkRemoveChar(jodit, fakeNode, backspace, mode);
34528
+ var wordChar = mode === 'word' && !isSpace(removed);
34529
+ // Backspace by word removes the spaces before the caret, then the word, and keeps the space in front of it
34530
+ if (mode === 'sentence' || wordChar || mode === 'word' && backspace) {
34531
+ checkRemoveChar(jodit, fakeNode, backspace, mode, wordChar && backspace);
34495
34532
  }
34496
34533
  }
34534
+ /**
34535
+ * The char tryRemoveChar would remove next
34536
+ */ function nextChar(value, backspace) {
34537
+ var chars = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(value);
34538
+ var step = backspace ? -1 : 1;
34539
+ var index = backspace ? chars.length - 1 : 0;
34540
+ while(chars[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE){
34541
+ index += step;
34542
+ }
34543
+ return chars[index];
34544
+ }
34545
+ function isSpace(char) {
34546
+ return char === ' ' || char === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
34547
+ }
34497
34548
 
34498
34549
 
34499
34550
  /***/ }),
@@ -34883,7 +34934,8 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
34883
34934
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
34884
34935
 
34885
34936
  "use strict";
34886
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5266);
34937
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
34938
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5266);
34887
34939
  /*!
34888
34940
  * Jodit Editor (https://xdsoft.net/jodit/)
34889
34941
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34891,13 +34943,18 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
34891
34943
  */ /**
34892
34944
  * @module plugins/backspace
34893
34945
  */
34894
- jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.delete = {
34946
+
34947
+ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
34895
34948
  hotkeys: {
34896
- delete: [
34949
+ delete: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
34950
+ 'delete'
34951
+ ] : [
34897
34952
  'delete',
34898
34953
  'cmd+backspace'
34899
34954
  ],
34900
- deleteWord: [
34955
+ deleteWord: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
34956
+ 'ctrl+delete'
34957
+ ] : [
34901
34958
  'ctrl+delete',
34902
34959
  'cmd+alt+backspace',
34903
34960
  'ctrl+alt+backspace'
@@ -34909,7 +34966,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.delete = {
34909
34966
  backspace: [
34910
34967
  'backspace'
34911
34968
  ],
34912
- backspaceWord: [
34969
+ backspaceWord: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [] : [
34913
34970
  'ctrl+backspace'
34914
34971
  ],
34915
34972
  backspaceSentence: [
@@ -41739,8 +41796,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41739
41796
  dialog.close();
41740
41797
  });
41741
41798
  buttons.remove.onAction(function() {
41799
+ var caret = j.s.createRange();
41800
+ caret.setStartBefore(_this.state.sourceImage);
41801
+ caret.collapse(true);
41742
41802
  j.s.removeNode(_this.state.sourceImage);
41743
41803
  dialog.close();
41804
+ j.s.selectRange(caret);
41744
41805
  });
41745
41806
  buttons.cancel.onAction(function() {
41746
41807
  dialog.close();
@@ -41754,10 +41815,20 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41754
41815
  ],
41755
41816
  buttons.check
41756
41817
  ]);
41757
- j.e.on(dialog, 'afterClose', function() {
41758
- if (_this.state.image.parentNode && j.o.image.selectImageAfterClose) {
41759
- j.s.select(_this.state.sourceImage);
41818
+ // The dialog fires `afterClose` on its own emitter, not the editor's
41819
+ dialog.e.on(dialog, 'afterClose', function() {
41820
+ var sourceImage = _this.state.sourceImage;
41821
+ if (j.isInDestruct || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isOrContains(j.editor, sourceImage)) {
41822
+ return;
41823
+ }
41824
+ if (j.o.image.selectImageAfterClose) {
41825
+ j.s.select(sourceImage);
41826
+ return;
41760
41827
  }
41828
+ var caret = j.s.createRange();
41829
+ caret.setStartAfter(sourceImage);
41830
+ caret.collapse(true);
41831
+ j.s.selectRange(caret);
41761
41832
  });
41762
41833
  dialog.setSize(j.o.image.dialogWidth);
41763
41834
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.markOwner)(j, dialog.container);
@@ -41795,6 +41866,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41795
41866
  this.activeTabState.activeTab = 'Image';
41796
41867
  this.__lock();
41797
41868
  this.dialog.open().setModal(true).setPosition();
41869
+ this.__focusFirstField();
41798
41870
  this.async.promise(function(resolve, reject) {
41799
41871
  return (0,_readers__WEBPACK_IMPORTED_MODULE_19__.readValuesFromImage)(_this.j, _this.state).then(resolve, reject);
41800
41872
  }).catch(function(e) {
@@ -41807,6 +41879,21 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41807
41879
  return false;
41808
41880
  }
41809
41881
  },
41882
+ {
41883
+ key: "__focusFirstField",
41884
+ value: /**
41885
+ * Keys typed while the dialog is open must not reach the editor behind it,
41886
+ * so focus the active tab's first field, or else the first field shown
41887
+ */ function __focusFirstField() {
41888
+ var _fields_concat_find;
41889
+ var fields = function fields(box) {
41890
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.toArray)(box.querySelectorAll('input, select, textarea'));
41891
+ };
41892
+ (_fields_concat_find = fields(this.form.getElm('tabsBox')).concat(fields(this.form.container)).find(function(field) {
41893
+ return field.offsetParent != null;
41894
+ })) === null || _fields_concat_find === void 0 ? void 0 : _fields_concat_find.focus();
41895
+ }
41896
+ },
41810
41897
  {
41811
41898
  key: "__lock",
41812
41899
  value: function __lock() {
@@ -46910,9 +46997,11 @@ var isButtonSeparator = function isButtonSeparator(item) {
46910
46997
  return cleaned;
46911
46998
  }
46912
46999
  /**
46913
- * The width that decides which breakpoint set the toolbar uses. A toolbar
46914
- * rendered into an external container (`toolbar` set to an element or a
46915
- * selector) lays out in that container, so its width is what matters there.
47000
+ * The width that decides which breakpoint set the toolbar uses: the editor's
47001
+ * own width, or its parent's while the editor has none yet (for example
47002
+ * while hidden at init). A toolbar rendered into an external container
47003
+ * (`toolbar` set to an element or a selector) lays out in that container, so
47004
+ * its width is what matters there.
46916
47005
  */ function adaptiveWidth(editor) {
46917
47006
  var _editor_container_parentElement;
46918
47007
  var toolbar = editor.o.toolbar;
@@ -46922,7 +47011,7 @@ var isButtonSeparator = function isButtonSeparator(item) {
46922
47011
  return width;
46923
47012
  }
46924
47013
  }
46925
- return ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
47014
+ return editor.container.offsetWidth || ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
46926
47015
  }
46927
47016
  /**
46928
47017
  * Rebuild toolbar in depends on editor's width
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.18.6
4
+ * Version: v4.18.7
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.18.6
11
+ * Version: v4.18.7
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */