Disable print preview in Chrome

Is there a way to disable print preview in Chrome using javascript? I need to open a popup in a web application with printable text; in this popup I have the following code when loading the page:

$(document).ready(function () { window.print(); }); 

Simple JavaScript that opens a print preview page Now it happens that the print preview page behaves like a modal dialog: I can no longer navigate in the application that opened the print page (even if the links are clickable). This behavior does not appear if the regular system dialog box is available (and in fact I do not have this problem in IE Explorer and Firefox). So, is there a way to tell Chrome to disable print preview via JavaScript?

+5
source share
1 answer

Is there a way to disable print preview in Chrome using javascript?

No (via javascript). Google, like any other company, likes to maintain a consistent user interface. If programmers could change how Chrome works on different pages outside of html, this will be a bad user interface.

Now it happens that the print preview page behaves like a modal dialog: I can no longer navigate in the application that opened the print page (even if the links are clickable).

Instead, you can open a new window with the same data and hava javascript to print. The previous window will work fine (assuming that the new window does not open on a new tab due to add-ons / configuration).

+8
source

All Articles