Skip to content

Commit

Permalink
Fixed a bug in <sl-textarea> that may throw errors on disconnectedCal…
Browse files Browse the repository at this point in the history
…lback in test environments (#1985) (#1986)
  • Loading branch information
schilchSICKAG committed Apr 22, 2024
1 parent 64996b2 commit 3ad6364
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/pages/resources/changelog.md
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/components/textarea/textarea.component.ts
Expand Up @@ -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() {
Expand Down

0 comments on commit 3ad6364

Please sign in to comment.