malsup / cycle2

2nd gen cycling
899 stars 239 forks source link

Cycle2 Print bug in IE11 ( I'm fairly sure about this !!! ) #794

Open visualperception opened 7 years ago

visualperception commented 7 years ago

OK here's the scenario but I can't find wether the bug is in JS, IE11 or Cycle2 or most likely, a combination of IE11 JS and Cycle2; I have a website and it works fine. Cycle2 works fine wherever its used in website. However, when I try and print a page with cycle2 on it from IE11 I have problems.

Firstly, I always lose approx 3 lines of output on page 2 whenever the print is multi page. This may be due to there being some padding carried over from page1 which shouldn't be. So you would think my "@media print" is wrong which is a fair guess. However, printing the exact same page from Chromium ( Iron ) browser works absolutely fine without this error, so @media print is good I think.

Now for the really weird bit I discovered by making a mistake. If I put a non existant class (not in the html) into the @media print it completely screws up the IE11 print preview/print by losing the scaling which should be happening on the image to make it fit the page. Methinks the class in @media print should just be ignored because it relates to nothing in the html. But no it messes up print preview/print.

Steps to reproduce the error:

load the following page in IE11 and then save page locally so you can edit the style.css file.

http://www.studioloci.eu/project-chelsea-flower-show-2014-london.php

edit style.css file and right down at end edit class name .cycle2-desc a to be .cycle-desc a save and load page in IE11 (cycle-desc doesn't exists in html) . Then goto ie11 print preview and images will fill page which they shouldn't.

then edit style.css back to .cycle2-desc a and refresh page and try again.

On my system the refresh doesn't clear the error. I have to close browser which deletes all browsing cache. Restart browser and then hit refresh several times before error clears. This suggests to me that JS has got a hold something in memory and IE11 doesn't like it. Now this could be a bug in IE11, JS or cycle2 messing with js/dom but I don't have enough knowledge of js to track it down.

If anyone with more knowledge than me could reproduce this it would be good if they can suggest where problem really is. I suspect its IE11 print dialog at the root of it becasue it works fine in chromium but it could be cycle2 js combined with IE11 print preview/print, I'm not sure which.

Any help / suggestions much appreciated.

p.s. the point being that I'm losing 2 or 3 lines on page 2 and also print preview goes haywire if @media print contains class which is not in html which seems to say its IE11 only but printing a page without cycle2 on it but a large image works with only 2 or 3 lines lost so it could be both IE11 and cycle2 that have bugs. Difficult one to track down.