Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sl-textarea causes "Error in parsing value for height" warning in Firefox #2107

Open
ykrods opened this issue Jul 15, 2024 · 3 comments
Open
Labels
bug Things that aren't working right in the library.

Comments

@ykrods
Copy link

ykrods commented Jul 15, 2024

Describe the bug

sl-textarea causes Error in parsing value for ‘height’. Declaration dropped. warning in Firefox.

To Reproduce

  1. Open Firefox
  2. Go to https://shoelace.style/components/textarea
  3. Open web developer tools and open Console tab
  4. Reload page or input some text on textarea

Screenshots

Screenshot from 2024-07-15 11-52-13

Browser / OS

  • OS: Manjaro Linux
  • Browser: Firefox
  • Browser version: 128.0-1

Additional information

This doesn't occur when sl-textarea has resize="auto" property.

I'm just guessing, but I have a feeling there's a problem here:

private setTextareaHeight() {
if (this.resize === 'auto') {
this.input.style.height = 'auto';
this.input.style.height = `${this.input.scrollHeight}px`;
} else {
(this.input.style.height as string | undefined) = undefined;
}
}

@ykrods ykrods added the bug Things that aren't working right in the library. label Jul 15, 2024
@claviska
Copy link
Member

I can't reproduce this on Firefox 128 (macOS) with warnings shown.

CleanShot 2024-07-15 at 10 48 29@2x

@KonnorRogers are you seeing this warning?

@KonnorRogers
Copy link
Collaborator

@claviska I can reproduce it on FF 128.0

@claviska
Copy link
Member

I see it now with the CSS tab selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

3 participants