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

Fixed elements not respected #460

Open
zakpucci opened this issue Apr 2, 2024 · 1 comment
Open

Fixed elements not respected #460

zakpucci opened this issue Apr 2, 2024 · 1 comment
Labels

Comments

@zakpucci
Copy link

zakpucci commented Apr 2, 2024

Using a fixed position node as the HTMLElement outputs a blob or data URL as expected. That same blob or data URL converted to a file is blank every time. If the browser is dragged to the size of the HTMLElement in question, it exports correctly.

Expected Behavior

Whichever specific node is used as the HTMLElement, would be respected no matter it's position in the dom.

Current Behavior

Fixed position HTMLElement ignored, instead, the package attempts to use the entire, it seems.

Steps To Reproduce

1.) Position an HTMLElement fixed, try to use this package to export it properly.
2.) Thats it.

Additional Context

If the browser is dragged to the size of the HTMLElement in question, it exports correctly, see image 1 where I dragged it halfway to show the cutoff. See image 2 to show the typical export on a fixed element.

Image 1:
Justin Brown - Quick Look (2)
Image 2:
Justin Brown - Quick Look (47)

Your Environment

  • html-to-image: 1.11.11
  • OS: macOS Sonoma 14.1.1
  • Browser: Chrome 122.0.6261.128
@zakpucci zakpucci added the bug label Apr 2, 2024
@vivcat
Copy link
Contributor

vivcat bot commented Apr 2, 2024

👋 @zakpucci

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

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

No branches or pull requests

1 participant