From 441b620f5e652eac7a337202862f52083574c610 Mon Sep 17 00:00:00 2001 From: Caroline D <108160931+CarolineDenis@users.noreply.github.com> Date: Tue, 28 Mar 2023 07:27:20 -0700 Subject: [PATCH 1/2] Fix scroll bar when exporting to TSV Fixes #2733 --- .../frontend/js_src/lib/components/Molecules/FilePicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx b/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx index 8aae0951abd..ceb7d84d3d8 100644 --- a/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx +++ b/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx @@ -140,6 +140,7 @@ export const downloadFile = async ( ): Promise => new Promise((resolve) => { const iframe = document.createElement('iframe'); + iframe.classList.add('absolute'); iframe.addEventListener('load', () => { if (iframe.contentWindow === null) return; const element = iframe.contentWindow.document.createElement('a'); From 282148290336b919873094c4390a56d30f42ba10 Mon Sep 17 00:00:00 2001 From: Caroline D <108160931+CarolineDenis@users.noreply.github.com> Date: Tue, 4 Apr 2023 13:10:42 -0700 Subject: [PATCH 2/2] Add hidden prop to iframe --- .../frontend/js_src/lib/components/Molecules/FilePicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx b/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx index ceb7d84d3d8..216d2379c70 100644 --- a/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx +++ b/specifyweb/frontend/js_src/lib/components/Molecules/FilePicker.tsx @@ -140,7 +140,7 @@ export const downloadFile = async ( ): Promise => new Promise((resolve) => { const iframe = document.createElement('iframe'); - iframe.classList.add('absolute'); + iframe.classList.add('absolute', 'hidden'); iframe.addEventListener('load', () => { if (iframe.contentWindow === null) return; const element = iframe.contentWindow.document.createElement('a');