@innovastudio/contentbox 1.2.15 → 1.2.16

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
@@ -40,7 +40,7 @@
40
40
  "webpack-dev-server": "^4.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@innovastudio/contentbuilder": "^1.1.15",
43
+ "@innovastudio/contentbuilder": "^1.1.16",
44
44
  "axios": "^0.21.4",
45
45
  "cors": "^2.8.5",
46
46
  "express": "^4.17.1",
@@ -9272,19 +9272,23 @@ class EditBox {
9272
9272
 
9273
9273
 
9274
9274
  const inpClickSrc = modalEditBox.querySelector('.input-src');
9275
- this.builder.editor.dom.observeElement(inpClickSrc, 'value', (oldValue, newValue) => {
9276
- const activeBox = this.builder.activeBox;
9277
- let currentValue = activeBox.getAttribute('data-modal-url');
9278
- if (!currentValue) currentValue = '';
9279
9275
 
9280
- if (currentValue !== newValue) {
9281
- this.builder.editor.saveForUndo();
9282
- this.builder.editor.dom.addClass(activeBox, 'block-click');
9283
- activeBox.setAttribute('data-modal-url', newValue); //Trigger Change event
9276
+ try {
9277
+ this.builder.editor.dom.observeElement(inpClickSrc, 'value', (oldValue, newValue) => {
9278
+ const activeBox = this.builder.activeBox;
9279
+ let currentValue = activeBox.getAttribute('data-modal-url');
9280
+ if (!currentValue) currentValue = '';
9284
9281
 
9285
- this.builder.onChange();
9286
- }
9287
- });
9282
+ if (currentValue !== newValue) {
9283
+ this.builder.editor.saveForUndo();
9284
+ this.builder.editor.dom.addClass(activeBox, 'block-click');
9285
+ activeBox.setAttribute('data-modal-url', newValue); //Trigger Change event
9286
+
9287
+ this.builder.onChange();
9288
+ }
9289
+ });
9290
+ } catch (e) {// Do Nothing
9291
+ }
9288
9292
 
9289
9293
  if (onImageSelectClick || imageselect || onFileSelectClick || fileselect) {
9290
9294
  const elm = modalEditBox.querySelector('.input-select');
@@ -77418,8 +77422,12 @@ class ContentBuilder {
77418
77422
  imageResizer.style.left = '-10px';
77419
77423
  imageResizer.style.width = '1px';
77420
77424
  imageResizer.style.height = '1px';
77421
- this.moveable.updateRect();
77422
- document.querySelector('.moveable-control-box').style.display = 'none';
77425
+
77426
+ try {
77427
+ this.moveable.updateRect();
77428
+ document.querySelector('.moveable-control-box').style.display = 'none';
77429
+ } catch (e) {// Do Nothing
77430
+ }
77423
77431
  }
77424
77432
 
77425
77433
  if (!(a || b || c || d || f || g || h || i || j || o || isSpecialElement) || rowClicked && !i || containerClicked) {