Fixed a bug in <sl-textarea> that may throw errors on disconnectedCallback in test environments (#1985) (#1986)

This commit is contained in:
Christian Schilling
2024-04-22 17:40:54 +02:00
committed by GitHub
parent 64996b2d35
commit 3ad6364678
2 changed files with 4 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<dialog>` where when it showed it would cause a layout shift. [#1967]
- Fixed a bug in `<sl-tooltip>` that allowed unwanted text properties to leak in [#1947]
- Fixed a bug in `<sl-button-group>` classes [#1974]
- Fixed a bug in `<sl-textarea>` that may throw errors on `disconnectedCallback` in test environments [#1985]
## 2.15.0

View File

@@ -163,7 +163,9 @@ export default class SlTextarea extends ShoelaceElement implements ShoelaceFormC
disconnectedCallback() {
super.disconnectedCallback();
this.resizeObserver.unobserve(this.input);
if (this.input) {
this.resizeObserver.unobserve(this.input);
}
}
private handleBlur() {