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

QInput autogrow doesn't restore state if toggled on and off dynamically (leaves inline style in place) #17535

Open
jannhama opened this issue Sep 24, 2024 · 1 comment
Assignees
Labels
area/components bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. flavour/vite-plugin Bugs related to Vite usage with Quasar kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@jannhama
Copy link

What happened?

QInput is defined with type="textarea" with autogrow that can be toggled on/off. I toggled autogrow prop on and off using a button. After setting autogrow to true and then back to false it didn't change text area back to scrolling mode as it initally was. This is due to inline style that is inserted to the q-input when autogrow is true but never removed.

What did you expect to happen?

If I dynamically change autogrow on/off then q-input component should respect that and change mode between autogrow and scrolling.

Reproduction URL

https://codepen.io/jannhama/pen/bGXNbeK?editors=1111

How to reproduce?

  1. Go to provided link
  2. Write several lines of text to the text area
  3. Press toggle autogrow button (initially it is false)
  4. Text area changes to autogrow mode correctly
  5. Press toggle autogrow button again
  6. Autogrow is set false but text area remains in autogrow mode

Flavour

Vite Plugin (@quasar/vite-plugin)

Areas

Components (quasar)

Platforms/Browsers

Firefox, Chrome

Quasar info output

No Quasar cli in use. Reproducable in Quasar 2.17

Relevant log output

No response

Additional context

Inline style with overflow y-hidden in the end is left to the component even if autogrow is toggled off.

<div class="q-field__control-container col relative-position row no-wrap q-anchor--skip" style=""><textarea class="q-field__native q-placeholder" tabindex="0" rows="6" id="f_a9f39d7b-5f49-4548-9505-23715853e4e8" value="text line text line text line text line text line text line text line text line text line text line text line text line text line text line text line text line text line" style="overflow-y: hidden; height: 329px;"></textarea><!----></div>

@jannhama jannhama added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Sep 24, 2024
@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/vite-plugin Bugs related to Vite usage with Quasar labels Sep 24, 2024
@jannhama jannhama changed the title QInput autogrow doesn't restore state if toggled on and off dynamically (leaves inlines tyle in place) QInput autogrow doesn't restore state if toggled on and off dynamically (leaves inline style in place) Sep 24, 2024
@raziq-quraishi
Copy link

Hi. I want to solve this issue. Please sign this issue so I can work on it.

@yusufkandemir yusufkandemir added bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. and removed bug/1-repro-available A reproduction is available and needs to be confirmed. labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. flavour/vite-plugin Bugs related to Vite usage with Quasar kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

3 participants