fix: Add proper html skeleton to preview iframe
This will prevent Quircks compatibility CSS rules from beeing applied, which leads to differences in preview/print-view
This commit is contained in:
parent
7d8e70e1ad
commit
e6d9966514
1 changed files with 13 additions and 0 deletions
|
|
@ -50,6 +50,19 @@ frappe.ui.form.PrintView = class {
|
|||
`
|
||||
);
|
||||
|
||||
const htmlSkeleton = `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
document.querySelector("iframe.print-format-container").srcdoc = htmlSkeleton;
|
||||
|
||||
this.print_settings = frappe.model.get_doc(":Print Settings", "Print Settings");
|
||||
this.setup_menu();
|
||||
this.setup_toolbar();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue