@nectary/components 5.44.2 → 5.44.3

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/bundle.js CHANGED
@@ -14470,7 +14470,7 @@ class RichTextarea extends NectaryElement {
14470
14470
  if (range !== null) {
14471
14471
  setBrowserCaret(range);
14472
14472
  this.#cachedRange = range;
14473
- this.#dispatchChangeEvent();
14473
+ this.#scheduleChangeDispatch();
14474
14474
  }
14475
14475
  };
14476
14476
  #onKeydown = (e) => {
@@ -14618,8 +14618,8 @@ class RichTextarea extends NectaryElement {
14618
14618
  if (result.range !== null) {
14619
14619
  setBrowserCaret(result.range);
14620
14620
  }
14621
- this.#scheduleChangeDispatch();
14622
14621
  }
14622
+ this.#scheduleChangeDispatch();
14623
14623
  this.#updateEditorEmptyClass();
14624
14624
  }
14625
14625
  #clearChangeDebounce() {
@@ -14648,10 +14648,11 @@ class RichTextarea extends NectaryElement {
14648
14648
  };
14649
14649
  #dispatchChangeEvent() {
14650
14650
  const value = serializeMarkdown(this.#$input, null);
14651
- this.#prevDispatchedValue = value;
14652
- if (value !== this.value) {
14653
- this.dispatchEvent(new CustomEvent("-change", { detail: value }));
14651
+ if (value === this.#prevDispatchedValue) {
14652
+ return;
14654
14653
  }
14654
+ this.#prevDispatchedValue = value;
14655
+ this.dispatchEvent(new CustomEvent("-change", { detail: value }));
14655
14656
  }
14656
14657
  #getCurrentRange = () => {
14657
14658
  if (isElementFocused(this.#$input)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "5.44.2",
3
+ "version": "5.44.3",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -272,7 +272,7 @@ class RichTextarea extends NectaryElement {
272
272
  if (range !== null) {
273
273
  setBrowserCaret(range);
274
274
  this.#cachedRange = range;
275
- this.#dispatchChangeEvent();
275
+ this.#scheduleChangeDispatch();
276
276
  }
277
277
  };
278
278
  #onKeydown = (e) => {
@@ -420,8 +420,8 @@ class RichTextarea extends NectaryElement {
420
420
  if (result.range !== null) {
421
421
  setBrowserCaret(result.range);
422
422
  }
423
- this.#scheduleChangeDispatch();
424
423
  }
424
+ this.#scheduleChangeDispatch();
425
425
  this.#updateEditorEmptyClass();
426
426
  }
427
427
  #clearChangeDebounce() {
@@ -450,10 +450,11 @@ class RichTextarea extends NectaryElement {
450
450
  };
451
451
  #dispatchChangeEvent() {
452
452
  const value = serializeMarkdown(this.#$input, null);
453
- this.#prevDispatchedValue = value;
454
- if (value !== this.value) {
455
- this.dispatchEvent(new CustomEvent("-change", { detail: value }));
453
+ if (value === this.#prevDispatchedValue) {
454
+ return;
456
455
  }
456
+ this.#prevDispatchedValue = value;
457
+ this.dispatchEvent(new CustomEvent("-change", { detail: value }));
457
458
  }
458
459
  #getCurrentRange = () => {
459
460
  if (isElementFocused(this.#$input)) {