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 #13196

Closed
zta7 opened this issue Apr 17, 2022 · 11 comments
Closed

QInput #13196

zta7 opened this issue Apr 17, 2022 · 11 comments
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@zta7
Copy link

zta7 commented Apr 17, 2022

What happened?

When using Qinput with autogrow attr and input mutiple lines then scrollbar appear.

What did you expect to happen?

And class='no-scroll' to input element directly and no scrollbar.

Reproduction URL

https://codepen.io/zta/pen/KKZrjaO?editors=101

How to reproduce?

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

Components (quasar)

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@zta7 zta7 added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Apr 17, 2022
@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack labels Apr 17, 2022
@MilosPaunovic
Copy link
Member

I can't reproduce it.
https://codepen.io/milospaunovic/pen/dyJQBVJ?editors=1010

Where does the scroll appear?

@zta7
Copy link
Author

zta7 commented Apr 17, 2022

image
emmmm....

I can't reproduce it. https://codepen.io/milospaunovic/pen/dyJQBVJ?editors=1010

Where does the scroll appear?

@MilosPaunovic
Copy link
Member

Screenshot 2022-04-17 at 15 44 58

It doesn't happen with me, on Chrome Version 100.0.4896.88 (Official Build) (x86_64), macOs BigSur 11.4. Please provide platform and browser info, so it could be further investigated.

@zta7
Copy link
Author

zta7 commented Apr 17, 2022

Same chrome version as yours. But both on win10 or win11 laptop has that problem.

@zta7
Copy link
Author

zta7 commented Apr 17, 2022

idk how scrollbar appeared, but add 'no-scroll' class on input work for me.

@zta7
Copy link
Author

zta7 commented Apr 17, 2022

And here's another problem with autogrow attr.Bcz it doesnt check window resize.
Should it fix in QInput component ?
image
image

@MilosPaunovic
Copy link
Member

I've just tried on Chrome Version 100.0.4896.88 (Official Build) (64-bit) on Win10 HP laptop, and it does seem alright. Could your try in Incognito mode and in another browser, to try to pinpoint the exact issue?

@zta7
Copy link
Author

zta7 commented Apr 17, 2022

In Incognito mode on chrome
Version 100.0.4896.127 (Official Build) (64-bit) (i just upgrade)
win11 XiaoMi laptop

image
And same problem the newest firefox.

Look at https://usefulangle.com/post/41/javascript-textarea-autogrow-adjust-height-based-on-content
It's works fine with 'overflow:hidden'
image
but since i disabled it, the scrollbar show up.
image

And https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight
image
This will make height less than the real height bcz it use round to calc, so it's reasonable set 'autoflow: hidden' to totally avoid scrollbar issue.

Actually i did some research, i found people use
'input.style.height=1px
input.style.height=input.scrollHeight '
always make scrollbar be hiddened.
But i cant figure out what make the scrollbar happend.

BTW, not the real bussiness. Qinput -> adjustHeight() trigger twice in each user input.
"version": "2.6.6",
image
image

@zta7
Copy link
Author

zta7 commented Apr 22, 2022

Hey, bro. I found more common issue reproduce. Tested on win10 Chrome 100.0.1185.44
No 'Enter' pressed !

https://codepen.io/milospaunovic/pen/dyJQBVJ?editors=1010
The Begining it has one more line which should not exist.
1650610629(1)

After u type more words, textarea comes more weird.
1650610656(1)

@hawkeye64
Copy link
Member

I can't make it create a scrollbar, but I do see the extra line (or 2) at the bottom behavior.

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 15, 2022
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 15, 2022
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 15, 2022
rstoenescu pushed a commit that referenced this issue Sep 15, 2022
@rstoenescu
Copy link
Member

Fix will be available in v2.8.3

rstoenescu pushed a commit that referenced this issue Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

4 participants