locizify 6.0.1 → 6.0.2

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ### 6.0.2
2
+
3
+ - update locize plugin
4
+
1
5
  ### 6.0.1
2
6
 
3
7
  - update locize plugin
@@ -12260,6 +12260,12 @@
12260
12260
  return found;
12261
12261
  }
12262
12262
 
12263
+ function ignoreMutation(ele) {
12264
+ var ret = ele.dataset && (ele.dataset.i18nextEditorElement === 'true' || ele.dataset.locizeEditorIgnore === 'true');
12265
+ if (!ret && ele.parentElement) return ignoreMutation(ele.parentElement);
12266
+ return ret;
12267
+ }
12268
+
12263
12269
  function createObserver(ele, handle) {
12264
12270
  var internalChange;
12265
12271
  var lastToggleTimeout;
@@ -12290,14 +12296,18 @@
12290
12296
 
12291
12297
  if (mutation.type === 'childList') {
12292
12298
  var notOurs = 0;
12293
- mutation.addedNodes.forEach(function (n) {
12294
- if (n.dataset && n.dataset.i18nextEditorElement === 'true') return;
12295
- notOurs = notOurs + 1;
12296
- }, 0);
12297
- mutation.removedNodes.forEach(function (n) {
12298
- if (n.dataset && n.dataset.i18nextEditorElement === 'true') return;
12299
- notOurs = notOurs + 1;
12300
- }, 0);
12299
+
12300
+ if (!ignoreMutation(mutation.target)) {
12301
+ mutation.addedNodes.forEach(function (n) {
12302
+ if (ignoreMutation(n)) return;
12303
+ notOurs = notOurs + 1;
12304
+ }, 0);
12305
+ mutation.removedNodes.forEach(function (n) {
12306
+ if (ignoreMutation(n)) return;
12307
+ notOurs = notOurs + 1;
12308
+ }, 0);
12309
+ }
12310
+
12301
12311
  if (notOurs === 0) return;
12302
12312
  }
12303
12313