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

When using Angular Material Field, Label is not getting exported in screenshot (Canvas/Image) #3141

Open
2 tasks done
subodhgodbole opened this issue Jan 29, 2024 · 0 comments

Comments

@subodhgodbole
Copy link

subodhgodbole commented Jan 29, 2024

Please make sure you are testing with the latest release of html2canvas.
Old versions are not supported and issues reported for them will be closed.

Please follow the general troubleshooting steps first:

  • You are using the latest version
  • You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

I am trying to use this library with my Angular project. However I see that generated canvas / image does not contain Angular Material Field's Label value. The generated image contains Prefix, Postfix, Hint, but not the Label, in both cases when appearance is "fill" or "outline".

Here is running example using Stackblitz - https://stackblitz.com/edit/angular-html-2-canvas

Two issues with labels -
When there is value in field, label is missing in canvas / image
myform-field-labels-missing

When there is no value in the field, label is getting truncated, also it gets overlapped with placeholder if it exists
myform-field-labels-truncating

When developing with Angular, it's very common to use Label, so label not getting into canvas / image is a major problem.

Specifications:

  • html2canvas version tested with: 1.4.1 - This is latest at the time of reporting this issue
  • Browser & version: Chrome 121.0.6167.86 (Official Build) (64-bit) - This is latest at the time of reporting this issue
  • Operating system: Windows 11
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