@innovastudio/contentbuilder 1.3.53 → 1.3.55
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/package.json
CHANGED
@@ -4165,10 +4165,8 @@ class Util {
|
|
4165
4165
|
dom.addClass(pop, 'active');
|
4166
4166
|
|
4167
4167
|
const handleClickOut = e => {
|
4168
|
-
if (!pop.contains(e.target) && !btn.contains(e.target)) {
|
4168
|
+
if (!pop.contains(e.target) && !btn.contains(e.target) && !e.target.closest('.pickcolormore')) {
|
4169
4169
|
// click outside
|
4170
|
-
const pickcolormore = document.querySelector('.pickcolormore.active');
|
4171
|
-
if (pickcolormore) if (pickcolormore.contains(e.target)) return;
|
4172
4170
|
this.hideRtePop(pop); // hide
|
4173
4171
|
|
4174
4172
|
pop.removeEventListener('keydown', handleKeyDown);
|
@@ -77340,7 +77338,9 @@ class ContentBuilder {
|
|
77340
77338
|
}
|
77341
77339
|
|
77342
77340
|
handleCellKeydown(col, e) {
|
77341
|
+
this.oriLen = col.textContent.length; // get character length
|
77343
77342
|
// Cleanup unwanted span
|
77343
|
+
|
77344
77344
|
let spans = col.querySelectorAll('span');
|
77345
77345
|
Array.prototype.forEach.call(spans, span => {
|
77346
77346
|
span.setAttribute('data-keep', '');
|
@@ -77844,13 +77844,27 @@ class ContentBuilder {
|
|
77844
77844
|
// jQuery('.cell-active').find('.elm-active').removeClass('elm-active');
|
77845
77845
|
// jQuery("#divElementTool").css("display", "none"); //force hide ellement tool
|
77846
77846
|
// Call onChange to indicate content change
|
77847
|
+
// this.opts.onChange();
|
77848
|
+
// console.log(this.oriLen,col.textContent.length);
|
77847
77849
|
|
77848
77850
|
|
77849
|
-
this.
|
77851
|
+
if (this.oriLen !== col.textContent.length) {
|
77852
|
+
// check if typing produce/reduce a character
|
77853
|
+
this.typing();
|
77854
|
+
} // Hide element highlight & tool during typing
|
77855
|
+
|
77850
77856
|
|
77851
77857
|
this.elmTool.hide();
|
77852
77858
|
}
|
77853
77859
|
|
77860
|
+
typing() {
|
77861
|
+
// console.log('typing');
|
77862
|
+
if (this.timeoutId) clearTimeout(this.timeoutId);
|
77863
|
+
this.timeoutId = setTimeout(() => {
|
77864
|
+
this.opts.onChange();
|
77865
|
+
}, 2000);
|
77866
|
+
}
|
77867
|
+
|
77854
77868
|
handleCellPaste() {
|
77855
77869
|
this.uo.saveForUndo();
|
77856
77870
|
const util = this.util;
|