Buttons Print - Microsoft Edge

Buttons Print - Microsoft Edge

UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1

Hello,

I seem to be having an issue with the Buttons extension, specifically when it comes to the print button. I am running Windows 10 and I found in Microsoft Edge when I click print, instead of showing the printer dialog along with the page to print, it only comes up and says blank page.

I figured it may be something in my code but all of the examples are doing the same thing.

Has anyone else run into this issue?

Scott

Replies

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    Sounds like a bug for certain. Got a new machine arriving in the next few days which will have Edge and will check it out then.

    Allan

  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1

    Allan,

    Does the print function create an iframe and then print from it? If so, it appears that is a bug in Microsoft Edge and they are aware of it (since July).

    Here is the Microsoft article:

    https://connect.microsoft.com/IE/Feedback/Details/1589775

    One of the workaround comments had this to say:
    Instead of calling window.print() immediately, open the contents of the iframe in a new window, and call print from there.

    Maybe some of that will help!

    Scott

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    No - it creates a new window and writes the HTML directly inside it (src file). However, it is quite possible that Buttons is triggering basically the same issue. I'll take a look into it when I've got Edge easily available (or download the VMs).

    Allan

  • bigracefan18bigracefan18 Posts: 15Questions: 2Answers: 0

    I just wondering where we are on this. I'm having the same issue with Windows 10 and Edge.

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    I've not had a chance to look into this yet I'm afraid. I will try to make some time to look into it as soon as possible. Are you using the latest version of Buttons, there have been some changes in this area which might address it.

    Allan

  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1

    I am using DataTables 1.10.11 and Buttons 1.1.2 and issue still exists.

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    Thanks for the confirmation. It looks like this is an Edge issue. I've isolated the issue and reported it should you be interested in the details.

    I've also committed a workaround in Buttons and the nightly will rebuild in just a few moments.

    Thanks for flagging this up :-)

    Allan

  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1

    Allan,

    I modified the Buttons code with the changes you made. Print in Edge now works!!

    Thanks for the fix.

    Scott

  • ThadThad Posts: 10Questions: 1Answers: 0

    Apologies for bumping an old thread, but I'm still seeing this issue intermittently; usually the print button works in Edge, but sometimes I get the blank tab. The behavior is not consistent; I can click the Print button twice on the same table without reloading, and it will work one time and give me a blank tab the next. (That suggests maybe it's a race condition.)

    Using DT 1.10.13, Buttons 1.2.4.

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    If you have a link to a page showing the issue that would be great.

    Thanks,
    Allan

  • ThadThad Posts: 10Questions: 1Answers: 0

    Unfortunately, it's an internal company site. I can see if it's possible to put together an example public-facing site with the same problem, but I'm not sure if that's feasible since the problem only seems to be occurring on one page and I haven't been able to reproduce it elsewhere yet.

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    Thanks. If you are able to recreate it somewhere I can access it, I'll be able to take a look into the issue.

    Allan

  • ThadThad Posts: 10Questions: 1Answers: 0

    Hi Allan,

    I'm actually seeing the issue on site here, on the Print button example page. It seems like the Print button works about half the time for me in Edge; the other half I get a blank page.

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    Interesting - I can see that as well with the latest Edge, and I hadn't seen that before.

    Thanks for letting me know about this. I'll look into what is causing it.

    Allan

  • bjjrollsbjjrolls Posts: 4Questions: 2Answers: 0

    Hi Allan,

    Has there been any update to this? I'm also experiencing the problem detailed by the OP. All exporting works fine across every major browser- the only problem is on Microsoft Edge the print opens s blank page.

    For the record, this works for me fine while debugging and even while accessing the Test teams build of our site. Yet, the same test site gives my colleagues the above error. I'm scratching my chin

  • allanallan Posts: 63,277Questions: 1Answers: 10,424 Site admin

    I believe it was a timeout issue. Have you used the latest version of Buttons (1.4.0)?

    Allan

This discussion has been closed.