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

Edge is duplicating images #236

Closed
wants to merge 3 commits into from
Closed

Conversation

dioscarey
Copy link

@dioscarey dioscarey commented Apr 7, 2020

Let's' have as an option to remove the images in the header since Edge browser is duplicating the images when it attempts to print. I'm not sure if in other browsers images are required in the header but this works pretty well so far in Firefox, Chrome, and Edge on desktop.

Fixes 218

Edge is duplicating images and it's not posible to have the option of exclude them from the header. With this change we will able to exclude images from the header as optional.
Updating Documentation for new prop excludeImgHeader
@MatthewHerbst
Copy link
Owner

Hello. I mentioned in #218 that I haven't been able to reproduce the error in Edge, and IE doesn't support codesandbox unfortunately. Do you know of a way I can test this in IE (I'm on a Mac)?

@dioscarey
Copy link
Author

Did it in Edge 44, on a Windows 10 PC and also installed in VirtualBox cause I also use Mac, So I guess is a common issue for Edge people.

@stranzhay
Copy link

@dioscarey is it possible to release a package of your branch ?

@dioscarey
Copy link
Author

@dioscarey is it possible to release a package of your branch ?

I made those changes in the project that Im working on and now they re in production I have no problems at the moment.

@lantanios
Copy link

In 2.6.3 all image tags are still pulled from outside of referenced div and are displayed on top of print screen. Browsers: IE 11 and Edge 42.

@MatthewHerbst
Copy link
Owner

@dioscarey does passing this prop break the printing when on Chrome or other browsers? How will a user of react-to-print know when to pass it and when not to? Will they have to do browser detection?

I want to get this fix in, but I want to make sure it's foolproof too: that it won't cause other problems for non-IE and non-Edge users

@dioscarey
Copy link
Author

@dioscarey does passing this prop break the printing when on Chrome or other browsers? How will a user of react-to-print know when to pass it and when not to? Will they have to do browser detection?

I want to get this fix in, but I want to make sure it's foolproof too: that it won't cause other problems for non-IE and non-Edge users

That's a really good point, cause Im not quite sure why the images are passed in the header, so I thought it would be a good idea to have those images not passed to the header as optional.

In my case, I did tests on iphone, ipad, chrome, safarai and EDGE. and I had not problem not passing images to the header, but maybe in some browsers are necessary, just wanted to have that param as optional.

@MatthewHerbst
Copy link
Owner

Ok @dioscarey, thanks for checking. Could you do one more test for me please? Try passing this param and loading a really, really big image. The change that is causing all these problems (#204) was meant to solve react-to-print not waiting for large images to load.

@MatthewHerbst
Copy link
Owner

I think I have a better solution for #204 that solves this problem: https://stackoverflow.com/questions/10240110/how-do-you-cache-an-image-in-javascript testing it now

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Apr 30, 2020

I've published a new release, 2.7.0-beta.1 Could you please try it out and see if it fixes the problems?

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Apr 30, 2020

@dioscarey you can please let me know if the new 2.7.0-beta.2 solves the problem for you?

@MatthewHerbst
Copy link
Owner

Code to fix this issue was shipped in 2.7.0.

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

Successfully merging this pull request may close these issues.

Image duplication in IE
4 participants