[chrome.tabCapture] Calling window.print() from offscreen tab hangs tab |
|||
Issue descriptionChrome Version: 61.0.3132.0 (Developer Build) unknown (64-bit) OS: Linux (presumably all) What steps will reproduce the problem? Call chrome.tabCapture.captureOffscreenTab with a document that calls window.print() E.g. Run the demo here, start a presentation and send the 'print' message https://github.com/mfoltzgoogle/samples/tree/temp-test-navigation/presentation-api What is the expected result? It's a no-op. What happens instead? Offscreen tab is blocked by a modal dialog that the user can't respond to. --- Notes: - Presentations started with offscreen tabs should not respond to window.print() per spec; the sandboxed modals flag prevents this but it would be good to add secondary enforcement in the implementation. - I don't see a way to prevent window.print() from spawning modal dialogs this way via WebContentsDelegate. This is either a bug in ShouldSuppressDialogs, or requires plumbing a new API. :-/ What happens instead? Please use labels and text to provide additional information. For graphics-related bugs, please copy/paste the contents of the about:gpu page at the end of this report.
,
Jun 16 2017
,
Jun 19 2017
Hmm...There are WebContentsDelegate overrides meant to protect against this, such as: https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc?rcl=c81a6b895381f8d921cbee83bc814710856cdec2&l=158 However, maybe that method is only used for page-initiated "popup" dialogs? We should see whether there needs to be a delegate override API to prevent any attempts to open user agent dialogs.
,
Mar 21 2018
Is window.print() triggering Print Preview, or a system print dialog here?
,
Aug 2
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mfo...@chromium.org
, Jun 16 2017