@innovastudio/contentbuilder 1.5.72 → 1.5.74

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.72",
4
+ "version": "1.5.74",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -93484,11 +93484,12 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
93484
93484
 
93485
93485
  if (!this.dom.getSelected()) {
93486
93486
  let inputFocused = document.activeElement.tagName.toLowerCase() === 'input';
93487
+ let insideEditable = this.doc.activeElement && this.doc.activeElement.closest('[contenteditable]');
93487
93488
 
93488
93489
  // if(!document.querySelector('.is-modal.active')) { // Additional (to prevent lost focus)
93489
93490
  let openedModal = document.querySelector('.is-modal.active:not(.is-modal-content)');
93490
93491
  if (target.closest('#glightbox-body')) openedModal = true;
93491
- if (!openedModal && !inputFocused) {
93492
+ if (!openedModal && !inputFocused && !insideEditable) {
93492
93493
  // Additional (to prevent lost focus)
93493
93494
 
93494
93495
  util.clearActiveCell();
@@ -93544,17 +93545,14 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
93544
93545
  */
93545
93546
  };
93546
93547
 
93547
- // document.addEventListener('click', this.doDocumentClick);
93548
- document.addEventListener('mousedown', this.doDocumentClick);
93549
- document.addEventListener('touchstart', this.doDocumentClick, {
93550
- passive: false
93551
- });
93548
+ document.addEventListener('click', this.doDocumentClick);
93549
+ // document.addEventListener('mousedown', this.doDocumentClick);
93550
+ // document.addEventListener('touchstart', this.doDocumentClick, { passive: false });
93551
+
93552
93552
  if (this.iframe) {
93553
- // this.doc.addEventListener('click', this.doDocumentClick);
93554
- this.doc.addEventListener('mousedown', this.doDocumentClick);
93555
- this.doc.addEventListener('touchstart', this.doDocumentClick, {
93556
- passive: false
93557
- });
93553
+ this.doc.addEventListener('click', this.doDocumentClick);
93554
+ // this.doc.addEventListener('mousedown', this.doDocumentClick);
93555
+ // this.doc.addEventListener('touchstart', this.doDocumentClick, { passive: false });
93558
93556
  }
93559
93557
 
93560
93558
  // Drag row will hide content tools
@@ -94298,11 +94296,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
94298
94296
  if (!col.getAttribute('data-click')) {
94299
94297
  // ON CLICK
94300
94298
  // Use bind() => https://www.w3schools.com/react/react_events.asp
94301
- // col.addEventListener('click', this.handleCellClick.bind(this, col));
94302
- col.addEventListener('mousedown', this.handleCellClick.bind(this, col));
94303
- col.addEventListener('touchstart', this.handleCellClick.bind(this, col), {
94304
- passive: false
94305
- });
94299
+ col.addEventListener('click', this.handleCellClick.bind(this, col));
94306
94300
 
94307
94301
  // ON KEYPRESS
94308
94302
  col.addEventListener('keydown', this.handleCellKeypress.bind(this));
@@ -95088,18 +95082,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
95088
95082
  if (snippetData) snippetData.remove();
95089
95083
  if (this.eb) this.eb.destroy();
95090
95084
  this.doc.body.classList.remove('data-editor');
95085
+ document.removeEventListener('click', this.doDocumentClick, false);
95086
+ // document.removeEventListener('mousedown', this.doDocumentClick);
95087
+ // document.removeEventListener('touchstart', this.doDocumentClick);
95091
95088
 
95092
- // document.removeEventListener('click', this.doDocumentClick, false);
95093
- document.removeEventListener('mousedown', this.doDocumentClick);
95094
- document.removeEventListener('touchstart', this.doDocumentClick);
95095
95089
  document.removeEventListener('keydown', this.doDocumentKeydown, false);
95096
95090
  document.removeEventListener('mousedown', this.doDocumentMousedown, false);
95097
95091
  document.removeEventListener('click', this.doRteClick, false);
95098
95092
  this.doc.removeEventListener('click', this.doHideSnippetHandler, false);
95099
95093
  if (this.iframe) {
95100
- // this.doc.removeEventListener('click', this.doDocumentClick, false);
95101
- this.doc.removeEventListener('mousedown', this.doDocumentClick);
95102
- this.doc.removeEventListener('touchstart', this.doDocumentClick);
95094
+ this.doc.removeEventListener('click', this.doDocumentClick, false);
95095
+ // this.doc.removeEventListener('mousedown', this.doDocumentClick);
95096
+ // this.doc.removeEventListener('touchstart', this.doDocumentClick);
95097
+
95103
95098
  this.doc.removeEventListener('keydown', this.doDocumentKeydown, false);
95104
95099
  this.doc.removeEventListener('mousedown', this.doDocumentMousedown, false);
95105
95100
  this.doc.removeEventListener('click', this.doRteClick, false);