jodit 4.12.7 → 4.12.8
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.
- package/CHANGELOG.md +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +99 -31
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +98 -31
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +98 -31
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +98 -30
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/size/get-fixed-position-offset.d.ts +21 -0
- package/esm/core/helpers/size/get-fixed-position-offset.js +46 -0
- package/esm/core/helpers/size/index.d.ts +1 -0
- package/esm/core/helpers/size/index.js +1 -0
- package/esm/core/ui/button/tooltip/tooltip.js +9 -3
- package/esm/core/ui/popup/popup.js +7 -3
- package/package.json +1 -1
- package/types/core/helpers/size/get-fixed-position-offset.d.ts +21 -0
- package/types/core/helpers/size/index.d.ts +1 -0
package/es2021.en/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.
|
|
4
|
+
* Version: v4.12.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1802,7 +1802,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1802
1802
|
* ```
|
|
1803
1803
|
* @packageDocumentation
|
|
1804
1804
|
* @module constants
|
|
1805
|
-
*/ const APP_VERSION = "4.12.
|
|
1805
|
+
*/ const APP_VERSION = "4.12.8";
|
|
1806
1806
|
// prettier-ignore
|
|
1807
1807
|
const ES = "es2021";
|
|
1808
1808
|
const IS_ES_MODERN = true;
|
|
@@ -6174,6 +6174,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6174
6174
|
/* harmony export */ colorToHex: function() { return /* reexport safe */ _color__WEBPACK_IMPORTED_MODULE_3__.colorToHex; },
|
|
6175
6175
|
/* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
|
|
6176
6176
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6177
|
+
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6177
6178
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6178
6179
|
/* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
|
|
6179
6180
|
/* harmony export */ hasContainer: function() { return /* reexport safe */ _checker__WEBPACK_IMPORTED_MODULE_2__.hasContainer; },
|
|
@@ -6244,7 +6245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6244
6245
|
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97642);
|
|
6245
6246
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(93640);
|
|
6246
6247
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
6247
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _utils__WEBPACK_IMPORTED_MODULE_8__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
6248
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _utils__WEBPACK_IMPORTED_MODULE_8__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
6248
6249
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
6249
6250
|
/*!
|
|
6250
6251
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -6625,6 +6626,58 @@ function normalizeCssValue(key, value) {
|
|
|
6625
6626
|
};
|
|
6626
6627
|
|
|
6627
6628
|
|
|
6629
|
+
/***/ }),
|
|
6630
|
+
|
|
6631
|
+
/***/ 2373:
|
|
6632
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6633
|
+
|
|
6634
|
+
"use strict";
|
|
6635
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6636
|
+
/* harmony export */ getFixedPositionOffset: function() { return /* binding */ getFixedPositionOffset; }
|
|
6637
|
+
/* harmony export */ });
|
|
6638
|
+
/*!
|
|
6639
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6640
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
6641
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6642
|
+
*/ /**
|
|
6643
|
+
* @module helpers/size
|
|
6644
|
+
*/ /**
|
|
6645
|
+
* Whether the element establishes a containing block for its
|
|
6646
|
+
* `position: fixed` descendants, so their coordinates become relative to it
|
|
6647
|
+
* instead of the viewport.
|
|
6648
|
+
*/ function isContainingBlockForFixed(style) {
|
|
6649
|
+
return style.transform !== '' && style.transform !== 'none' || style.perspective !== '' && style.perspective !== 'none' || style.filter !== '' && style.filter !== 'none' || style.willChange === 'transform' || style.willChange === 'perspective' || style.willChange === 'filter' || style.contain === 'paint' || style.contain === 'layout' || style.contain === 'strict' || style.contain === 'content';
|
|
6650
|
+
}
|
|
6651
|
+
/**
|
|
6652
|
+
* Returns the viewport offset of the containing block of a `position: fixed`
|
|
6653
|
+
* descendant of `elm`. A fixed element is normally positioned relative to the
|
|
6654
|
+
* viewport, but an ancestor with `transform`, `filter`, `perspective`, etc.
|
|
6655
|
+
* establishes a new containing block, shifting the fixed element by that
|
|
6656
|
+
* ancestor's top-left corner. The returned offset should be subtracted from
|
|
6657
|
+
* the desired viewport coordinates before applying them.
|
|
6658
|
+
*
|
|
6659
|
+
* Returns `{ x: 0, y: 0 }` when no such ancestor exists (the common case), so
|
|
6660
|
+
* call sites keep their previous behaviour unchanged.
|
|
6661
|
+
*/ function getFixedPositionOffset(elm) {
|
|
6662
|
+
const win = elm.ownerDocument?.defaultView;
|
|
6663
|
+
let node = elm.parentElement;
|
|
6664
|
+
while(win && node){
|
|
6665
|
+
if (isContainingBlockForFixed(win.getComputedStyle(node))) {
|
|
6666
|
+
const rect = node.getBoundingClientRect();
|
|
6667
|
+
return {
|
|
6668
|
+
x: rect.left,
|
|
6669
|
+
y: rect.top
|
|
6670
|
+
};
|
|
6671
|
+
}
|
|
6672
|
+
node = node.parentElement;
|
|
6673
|
+
}
|
|
6674
|
+
return {
|
|
6675
|
+
x: 0,
|
|
6676
|
+
y: 0
|
|
6677
|
+
};
|
|
6678
|
+
}
|
|
6679
|
+
|
|
6680
|
+
|
|
6628
6681
|
/***/ }),
|
|
6629
6682
|
|
|
6630
6683
|
/***/ 34027:
|
|
@@ -6668,18 +6721,20 @@ function getScrollParent(node) {
|
|
|
6668
6721
|
"use strict";
|
|
6669
6722
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6670
6723
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _get_content_width__WEBPACK_IMPORTED_MODULE_0__.getContentWidth; },
|
|
6671
|
-
/* harmony export */
|
|
6672
|
-
/* harmony export */
|
|
6673
|
-
/* harmony export */
|
|
6674
|
-
/* harmony export */
|
|
6675
|
-
/* harmony export */
|
|
6724
|
+
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _get_fixed_position_offset__WEBPACK_IMPORTED_MODULE_1__.getFixedPositionOffset; },
|
|
6725
|
+
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _get_scroll_parent__WEBPACK_IMPORTED_MODULE_2__.getScrollParent; },
|
|
6726
|
+
/* harmony export */ innerWidth: function() { return /* reexport safe */ _inner_width__WEBPACK_IMPORTED_MODULE_3__.innerWidth; },
|
|
6727
|
+
/* harmony export */ offset: function() { return /* reexport safe */ _offset__WEBPACK_IMPORTED_MODULE_5__.offset; },
|
|
6728
|
+
/* harmony export */ position: function() { return /* reexport safe */ _position__WEBPACK_IMPORTED_MODULE_6__.position; },
|
|
6729
|
+
/* harmony export */ size: function() { return /* reexport safe */ _object_size__WEBPACK_IMPORTED_MODULE_4__.size; }
|
|
6676
6730
|
/* harmony export */ });
|
|
6677
6731
|
/* harmony import */ var _get_content_width__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54447);
|
|
6678
|
-
/* harmony import */ var
|
|
6679
|
-
/* harmony import */ var
|
|
6680
|
-
/* harmony import */ var
|
|
6681
|
-
/* harmony import */ var
|
|
6682
|
-
/* harmony import */ var
|
|
6732
|
+
/* harmony import */ var _get_fixed_position_offset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2373);
|
|
6733
|
+
/* harmony import */ var _get_scroll_parent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34027);
|
|
6734
|
+
/* harmony import */ var _inner_width__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83215);
|
|
6735
|
+
/* harmony import */ var _object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18073);
|
|
6736
|
+
/* harmony import */ var _offset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(69143);
|
|
6737
|
+
/* harmony import */ var _position__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23599);
|
|
6683
6738
|
/*!
|
|
6684
6739
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6685
6740
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -6694,6 +6749,7 @@ function getScrollParent(node) {
|
|
|
6694
6749
|
|
|
6695
6750
|
|
|
6696
6751
|
|
|
6752
|
+
|
|
6697
6753
|
/***/ }),
|
|
6698
6754
|
|
|
6699
6755
|
/***/ 83215:
|
|
@@ -13703,9 +13759,10 @@ UIButtonGroup = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decor
|
|
|
13703
13759
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84839);
|
|
13704
13760
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27795);
|
|
13705
13761
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28077);
|
|
13706
|
-
/* harmony import */ var
|
|
13707
|
-
/* harmony import */ var
|
|
13708
|
-
/* harmony import */ var
|
|
13762
|
+
/* harmony import */ var jodit_core_helpers_size_get_fixed_position_offset__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2373);
|
|
13763
|
+
/* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23599);
|
|
13764
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(93640);
|
|
13765
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(96007);
|
|
13709
13766
|
/*!
|
|
13710
13767
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
13711
13768
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -13724,6 +13781,7 @@ UIButtonGroup = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decor
|
|
|
13724
13781
|
|
|
13725
13782
|
|
|
13726
13783
|
|
|
13784
|
+
|
|
13727
13785
|
const WINDOW_EVENTS_ON_HIDE = [
|
|
13728
13786
|
'scroll.tooltip',
|
|
13729
13787
|
'joditCloseDialog',
|
|
@@ -13738,7 +13796,7 @@ const JODIT_EVENTS_ON_HIDE = [
|
|
|
13738
13796
|
'beforePopupClose.tooltip',
|
|
13739
13797
|
'closeAllPopups.tooltip'
|
|
13740
13798
|
];
|
|
13741
|
-
class UITooltip extends
|
|
13799
|
+
class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_9__.UIElement {
|
|
13742
13800
|
className() {
|
|
13743
13801
|
return 'UITooltip';
|
|
13744
13802
|
}
|
|
@@ -13784,11 +13842,11 @@ class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_8__.UIEle
|
|
|
13784
13842
|
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isHTMLElement(e.target)) {
|
|
13785
13843
|
return;
|
|
13786
13844
|
}
|
|
13787
|
-
const tooltip = (0,
|
|
13845
|
+
const tooltip = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.attr)(e.target, 'aria-label');
|
|
13788
13846
|
if (!tooltip) {
|
|
13789
13847
|
return;
|
|
13790
13848
|
}
|
|
13791
|
-
const disabled = Boolean((0,
|
|
13849
|
+
const disabled = Boolean((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.attr)(e.target, 'disabled'));
|
|
13792
13850
|
if (disabled) {
|
|
13793
13851
|
return;
|
|
13794
13852
|
}
|
|
@@ -13799,7 +13857,7 @@ class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_8__.UIEle
|
|
|
13799
13857
|
this.__currentTarget = e.target;
|
|
13800
13858
|
const target = e.target;
|
|
13801
13859
|
this.__open(()=>{
|
|
13802
|
-
const pos = (0,
|
|
13860
|
+
const pos = (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_7__.position)(target);
|
|
13803
13861
|
return {
|
|
13804
13862
|
x: pos.left + pos.width / 2,
|
|
13805
13863
|
y: pos.top + pos.height
|
|
@@ -13823,18 +13881,23 @@ class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_8__.UIEle
|
|
|
13823
13881
|
this.setMod('above', false);
|
|
13824
13882
|
this.getElm('content').innerHTML = content;
|
|
13825
13883
|
const point = getPoint();
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
}
|
|
13830
|
-
const
|
|
13884
|
+
// The tooltip is `position: fixed`. If it is rendered inside an ancestor
|
|
13885
|
+
// with a `transform` (e.g. an editor placed in a modal/flyout), that
|
|
13886
|
+
// ancestor becomes the containing block, so viewport coordinates must be
|
|
13887
|
+
// shifted by its offset. Returns `{0, 0}` when there is no such ancestor.
|
|
13888
|
+
const offset = (0,jodit_core_helpers_size_get_fixed_position_offset__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset)(this.container);
|
|
13889
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, {
|
|
13890
|
+
left: point.x - offset.x,
|
|
13891
|
+
top: point.y - offset.y
|
|
13892
|
+
});
|
|
13893
|
+
const tooltipPos = (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_7__.position)(this.container);
|
|
13831
13894
|
const viewHeight = this.j.ow.innerHeight;
|
|
13832
13895
|
// If tooltip overflows below viewport, show it above the target
|
|
13833
13896
|
if (tooltipPos.top + tooltipPos.height > viewHeight) {
|
|
13834
|
-
const targetPos = (0,
|
|
13897
|
+
const targetPos = (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_7__.position)(this.__currentTarget);
|
|
13835
13898
|
this.setMod('above', true);
|
|
13836
|
-
(0,
|
|
13837
|
-
top: targetPos.top - tooltipPos.height
|
|
13899
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, {
|
|
13900
|
+
top: targetPos.top - tooltipPos.height - offset.y
|
|
13838
13901
|
});
|
|
13839
13902
|
}
|
|
13840
13903
|
}
|
|
@@ -13846,7 +13909,7 @@ class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_8__.UIEle
|
|
|
13846
13909
|
this.__isOpened = false;
|
|
13847
13910
|
this.setMod('visible', false);
|
|
13848
13911
|
this.getElm('content').innerHTML = '';
|
|
13849
|
-
(0,
|
|
13912
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, {
|
|
13850
13913
|
left: -5000
|
|
13851
13914
|
});
|
|
13852
13915
|
}
|
|
@@ -15782,9 +15845,13 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_9__.UIGro
|
|
|
15782
15845
|
}
|
|
15783
15846
|
const [pos, strategy] = this.__calculatePosition(this.__targetBound(), this.viewBound(), (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.position)(this.container, this.j));
|
|
15784
15847
|
this.setMod('strategy', strategy);
|
|
15848
|
+
// The popup is `position: fixed`; shift by the containing-block offset
|
|
15849
|
+
// when it is rendered inside a transformed ancestor (e.g. a modal),
|
|
15850
|
+
// otherwise `{0, 0}` keeps the viewport coordinates unchanged.
|
|
15851
|
+
const offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset)(this.container);
|
|
15785
15852
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(this.container, {
|
|
15786
|
-
left: pos.left,
|
|
15787
|
-
top: pos.top
|
|
15853
|
+
left: pos.left - offset.x,
|
|
15854
|
+
top: pos.top - offset.y
|
|
15788
15855
|
});
|
|
15789
15856
|
this.__childrenPopups.forEach((popup)=>popup.updatePosition());
|
|
15790
15857
|
return this;
|