mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Hides the link icon in print view
Summary: Users complained about white spaces left by the link icon when printing. Diff fixes the issue by hiding link icon completely. Test Plan: Adds tests in `nbrowser/Printing.ts` Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3767
This commit is contained in:
@@ -64,7 +64,7 @@ export async function printViewSection(layout: any, viewSection: ViewSectionRec)
|
||||
}
|
||||
|
||||
const sub1 = dom.onElem(window, 'beforeprint', () => prepareToPrint(true));
|
||||
const sub2 = dom.onElem(window, 'afterprint', () => {
|
||||
const sub2 = dom.onElem(window, 'afterprint', (window as any).afterPrintCallback = () => {
|
||||
sub1.dispose();
|
||||
sub2.dispose();
|
||||
// To debug printing, set window.debugPrinting=1 in the console, then print a section, dismiss
|
||||
@@ -75,6 +75,7 @@ export async function printViewSection(layout: any, viewSection: ViewSectionRec)
|
||||
} else {
|
||||
prepareToPrint(false);
|
||||
}
|
||||
delete (window as any).afterPrintCallback;
|
||||
});
|
||||
|
||||
// Running print on a timeout makes it possible to test printing using selenium, and doesn't
|
||||
|
||||
Reference in New Issue
Block a user