Преглед изворни кода

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 b341167ffc)
version-14
Gavin D'souza пре 4 година
committed by mergify-bot
родитељ
комит
fc86458d3e
1 измењених фајлова са 2 додато и 1 уклоњено
  1. +2
    -1
      frappe/www/printview.py

+ 2
- 1
frappe/www/printview.py Прегледај датотеку

@@ -505,8 +505,9 @@ window.print();


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

Loading…
Откажи
Сачувај