ICEfaces
  1. ICEfaces
  2. ICE-9607

JavaScript window.print not executed in Chrome when an ICEpush connection is open

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-3.2.0.GA, EE-3.3.0.GA, EE-3.3.0.GA_P01
    • Fix Version/s: None
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      Chrome, Safari, Push
    • Assignee Priority:
      P2
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Using the browser file menu or the keyboard shortcut Ctrl+P works fine.

      Description

      A commandLink has the following onclick event set: onclick="window.print();return false;"

      This should bring up the various print dialogs in browsers. This is working in Firefox and IE browsers but not Chrome/Safari when there is an active push connection. If there is no push connection, then the window.print call works fine.

      In testing I also saw that the dialog would come up once the browser is being closed or refreshed.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case and war file. The icefaces-ee-ace.jar needs to be added in to run the war.

        Steps:

        • Load welcomeICEfaces.jsf
        • click on the 'click to pring' link that is after the Test button.
        • In chrome, nothing happens, in other browsers the print dialog is shown.
        Show
        Arran Mccullough added a comment - Attached test case and war file. The icefaces-ee-ace.jar needs to be added in to run the war. Steps: Load welcomeICEfaces.jsf click on the 'click to pring' link that is after the Test button. In chrome, nothing happens, in other browsers the print dialog is shown.
        Hide
        Mircea Toma added a comment -

        It seems that Chrome will not print the page until there are XHR requests pending. So the onclick callback will need to temporarily pause the blocking connection until the print will execute.

        ... onclick="ice.push.connection.pauseConnection();
        window.print();ice.push.connection.resumeConnection();
        ;return false;" ...
        
        Show
        Mircea Toma added a comment - It seems that Chrome will not print the page until there are XHR requests pending. So the onclick callback will need to temporarily pause the blocking connection until the print will execute. ... onclick="ice.push.connection.pauseConnection(); window.print();ice.push.connection.resumeConnection(); ; return false ;" ...

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: