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

useElementSize returns wrong size when using { box: 'border-box' } #2158

Closed
7 tasks done
fmgrafikdesign opened this issue Sep 2, 2022 · 2 comments · Fixed by #2143
Closed
7 tasks done

useElementSize returns wrong size when using { box: 'border-box' } #2158

fmgrafikdesign opened this issue Sep 2, 2022 · 2 comments · Fixed by #2143

Comments

@fmgrafikdesign
Copy link

fmgrafikdesign commented Sep 2, 2022

Describe the bug

useElementSize seems to ignore the provided option { box: 'border-box' } and instead still uses the content-box of the element.

The example shows how the lower box reports the same size as the upper one, even though it should be reporting the border-box sizing, which would be 250 x 200 (checked via chrome inspector).

Reproduction

https://stackblitz.com/edit/vitejs-vite-fxnszl/?file=src%2FApp.vue

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 14.48 GB / 31.93 GB
  Binaries:
    Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 104.0.5112.102
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.25)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

npm

Validations

@Agility6
Copy link

Agility6 commented Sep 4, 2022

This PR seems to solve your problem?🤔 #2143

@fmgrafikdesign
Copy link
Author

Very nice, thank you! Hope it gets merged soon. 👍 Kinda confusing the documentation advertises a feature that is not actually implemented yet. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants