From ea1cf1100b3b63eb3fcaaca72b96c1e998b4dfeb Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Sat, 3 Apr 2021 13:29:25 +0200 Subject: [PATCH] window.load does not work on ios --- static/js/order.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/js/order.js b/static/js/order.js index 19239f4..2cc834f 100644 --- a/static/js/order.js +++ b/static/js/order.js @@ -110,9 +110,10 @@ $(document).ready(function () { window.location.replace("/"); }); -}); + function callback() { + console.log("Callback Funktion wird aufgerufen"); + $('#quantity').focus().select(); + } -$(window).on('load', function() { - console.log("Window loded..."); - $('#quantity').focus().select(); + setTimeout(callback, 10); });