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

Inconsistent border when some of side border is 'none' #1920

Closed
vasylHordynskyy opened this issue Jul 5, 2019 · 1 comment · Fixed by #2010
Closed

Inconsistent border when some of side border is 'none' #1920

vasylHordynskyy opened this issue Jul 5, 2019 · 1 comment · Fixed by #2010

Comments

@vasylHordynskyy
Copy link

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:

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

Bug reports:

Not all borders are present on dive when some border side is set to 'none'.
I have div in my application with following styles:
<div
style={{
border: '1px solid green',
borderBottom: 'none',
}}
>
Test screenshot

Then I use html2canvas to create screenshot of it:
html2canvas(document.body, {}).then(canvas => {
document.body.appendChild(canvas);
});

As result I got screenshot where bottom and left border is missing.

I have checked on version 1.0.0-rc1 and it works as expected.

Also I found workaround for this issue. I have to specify following style for div:
borderBottom: '0px solid', instead of 'none'.
then I get correct screenshot on 1.0.0-rc3.

Specifications:

  • html2canvas version tested with: 1.0.0-rc3
  • Browser & version: Chrome 75, Firefox 67.0.4
  • Operating system: Windows 10
masak64 pushed a commit to masak64/html2canvas that referenced this issue Jul 31, 2019
@mzh0922
Copy link

mzh0922 commented Aug 28, 2019

参照这个终于可以了,https://github.com/masak64/html2canvas
image

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