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

Screenshot 'position: fixed' level is not corrent. #3149

Open
promise96319 opened this issue Feb 27, 2024 · 0 comments
Open

Screenshot 'position: fixed' level is not corrent. #3149

promise96319 opened this issue Feb 27, 2024 · 0 comments

Comments

@promise96319
Copy link

Bug reports:

<div style={{ position: 'relative' }}>
	<div style={{ position: 'fixed', left: 0, top: 0 }} />
</div>

When 'position: fixed' has a parent/grandparent node that has the style 'position: relative', the screenshot's level is not correct.

Because the renderContentStack method render 'position: fixed' after 'position: relative'。But 'position: fixed' should render in the top level, it should be relative to the viewport or 'transform: xxx', not 'position: relative'

Specifications:

  • html2canvas version tested with: 1.4.1
  • Browser & version: Chrome Version 122.0.6261.69 (Official Build) (x86_64)
  • Operating system: macOS Sonoma
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

No branches or pull requests

1 participant