@nectary/components 5.44.2 → 5.44.4
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 +7 -5
- package/package.json +1 -1
- package/popover/index.js +1 -0
- package/rich-textarea/index.js +6 -5
package/bundle.js
CHANGED
|
@@ -7570,6 +7570,7 @@ class Popover extends NectaryElement {
|
|
|
7570
7570
|
this.#$tip.style.left = "";
|
|
7571
7571
|
}
|
|
7572
7572
|
#updateTipOrientation = () => {
|
|
7573
|
+
this.#resetTipOrientation();
|
|
7573
7574
|
const orientation = this.orientation;
|
|
7574
7575
|
const targetRect = this.#$pop.footprintRect;
|
|
7575
7576
|
const contentRect = this.#$content.getBoundingClientRect();
|
|
@@ -14470,7 +14471,7 @@ class RichTextarea extends NectaryElement {
|
|
|
14470
14471
|
if (range !== null) {
|
|
14471
14472
|
setBrowserCaret(range);
|
|
14472
14473
|
this.#cachedRange = range;
|
|
14473
|
-
this.#
|
|
14474
|
+
this.#scheduleChangeDispatch();
|
|
14474
14475
|
}
|
|
14475
14476
|
};
|
|
14476
14477
|
#onKeydown = (e) => {
|
|
@@ -14618,8 +14619,8 @@ class RichTextarea extends NectaryElement {
|
|
|
14618
14619
|
if (result.range !== null) {
|
|
14619
14620
|
setBrowserCaret(result.range);
|
|
14620
14621
|
}
|
|
14621
|
-
this.#scheduleChangeDispatch();
|
|
14622
14622
|
}
|
|
14623
|
+
this.#scheduleChangeDispatch();
|
|
14623
14624
|
this.#updateEditorEmptyClass();
|
|
14624
14625
|
}
|
|
14625
14626
|
#clearChangeDebounce() {
|
|
@@ -14648,10 +14649,11 @@ class RichTextarea extends NectaryElement {
|
|
|
14648
14649
|
};
|
|
14649
14650
|
#dispatchChangeEvent() {
|
|
14650
14651
|
const value = serializeMarkdown(this.#$input, null);
|
|
14651
|
-
this.#prevDispatchedValue
|
|
14652
|
-
|
|
14653
|
-
this.dispatchEvent(new CustomEvent("-change", { detail: value }));
|
|
14652
|
+
if (value === this.#prevDispatchedValue) {
|
|
14653
|
+
return;
|
|
14654
14654
|
}
|
|
14655
|
+
this.#prevDispatchedValue = value;
|
|
14656
|
+
this.dispatchEvent(new CustomEvent("-change", { detail: value }));
|
|
14655
14657
|
}
|
|
14656
14658
|
#getCurrentRange = () => {
|
|
14657
14659
|
if (isElementFocused(this.#$input)) {
|
package/package.json
CHANGED
package/popover/index.js
CHANGED
|
@@ -207,6 +207,7 @@ class Popover extends NectaryElement {
|
|
|
207
207
|
this.#$tip.style.left = "";
|
|
208
208
|
}
|
|
209
209
|
#updateTipOrientation = () => {
|
|
210
|
+
this.#resetTipOrientation();
|
|
210
211
|
const orientation = this.orientation;
|
|
211
212
|
const targetRect = this.#$pop.footprintRect;
|
|
212
213
|
const contentRect = this.#$content.getBoundingClientRect();
|
package/rich-textarea/index.js
CHANGED
|
@@ -272,7 +272,7 @@ class RichTextarea extends NectaryElement {
|
|
|
272
272
|
if (range !== null) {
|
|
273
273
|
setBrowserCaret(range);
|
|
274
274
|
this.#cachedRange = range;
|
|
275
|
-
this.#
|
|
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
|
|
454
|
-
|
|
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)) {
|