@innovastudio/contentbuilder 1.5.70 → 1.5.72

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.70",
4
+ "version": "1.5.72",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -5304,7 +5304,7 @@ class Util {
5304
5304
  this.builder.uo.saveForUndo();
5305
5305
  let element = elm;
5306
5306
  let newelement;
5307
- if (!element.nextElementSibling) {
5307
+ if (!element.nextElementSibling && !element.closest('[data-subblock]')) {
5308
5308
  // active element is div.display > p.
5309
5309
  let activeCol = this.builder.activeCol;
5310
5310
  let current;
@@ -93411,7 +93411,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
93411
93411
  };
93412
93412
 
93413
93413
  // Add document Click event
93414
- document.addEventListener('click', this.doDocumentClick = e => {
93414
+ this.doDocumentClick = e => {
93415
93415
  let target = e.target;
93416
93416
  if (!target) return;
93417
93417
  rteClick(e);
@@ -93542,10 +93542,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
93542
93542
  });
93543
93543
  }
93544
93544
  */
93545
- });
93545
+ };
93546
93546
 
93547
+ // document.addEventListener('click', this.doDocumentClick);
93548
+ document.addEventListener('mousedown', this.doDocumentClick);
93549
+ document.addEventListener('touchstart', this.doDocumentClick, {
93550
+ passive: false
93551
+ });
93547
93552
  if (this.iframe) {
93548
- this.doc.addEventListener('click', this.doDocumentClick);
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
+ });
93549
93558
  }
93550
93559
 
93551
93560
  // Drag row will hide content tools
@@ -94289,7 +94298,11 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
94289
94298
  if (!col.getAttribute('data-click')) {
94290
94299
  // ON CLICK
94291
94300
  // Use bind() => https://www.w3schools.com/react/react_events.asp
94292
- col.addEventListener('click', this.handleCellClick.bind(this, col));
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
+ });
94293
94306
 
94294
94307
  // ON KEYPRESS
94295
94308
  col.addEventListener('keydown', this.handleCellKeypress.bind(this));
@@ -95075,13 +95088,18 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
95075
95088
  if (snippetData) snippetData.remove();
95076
95089
  if (this.eb) this.eb.destroy();
95077
95090
  this.doc.body.classList.remove('data-editor');
95078
- document.removeEventListener('click', this.doDocumentClick, false);
95091
+
95092
+ // document.removeEventListener('click', this.doDocumentClick, false);
95093
+ document.removeEventListener('mousedown', this.doDocumentClick);
95094
+ document.removeEventListener('touchstart', this.doDocumentClick);
95079
95095
  document.removeEventListener('keydown', this.doDocumentKeydown, false);
95080
95096
  document.removeEventListener('mousedown', this.doDocumentMousedown, false);
95081
95097
  document.removeEventListener('click', this.doRteClick, false);
95082
95098
  this.doc.removeEventListener('click', this.doHideSnippetHandler, false);
95083
95099
  if (this.iframe) {
95084
- this.doc.removeEventListener('click', this.doDocumentClick, false);
95100
+ // this.doc.removeEventListener('click', this.doDocumentClick, false);
95101
+ this.doc.removeEventListener('mousedown', this.doDocumentClick);
95102
+ this.doc.removeEventListener('touchstart', this.doDocumentClick);
95085
95103
  this.doc.removeEventListener('keydown', this.doDocumentKeydown, false);
95086
95104
  this.doc.removeEventListener('mousedown', this.doDocumentMousedown, false);
95087
95105
  this.doc.removeEventListener('click', this.doRteClick, false);