fix: Increase timeout for window close

On mobile view, window.close would block rendering the print view.
Increasing the timeout to 10s from 1s helps

(cherry picked from commit b341167ffc37b1b93bdf1d712406c1d730746fd6)
This commit is contained in:
Gavin D'souza 2021-05-19 19:58:42 +05:30 committed by mergify-bot
parent 321673fec3
commit fc86458d3e

View file

@ -505,8 +505,9 @@ window.print();
// close the window after print
// NOTE: doesn't close if print is cancelled in Chrome
// Changed timeout to 5s from 1s because it blocked mobile view rendering
setTimeout(function() {
window.close();
}, 1000);
}, 5000);
</script>
"""