From 4ec8fbcf4785d33497afc1718a7cede053d2e216 Mon Sep 17 00:00:00 2001 From: Patrick Mota Date: Sat, 8 Dec 2018 14:44:19 +0100 Subject: [PATCH] Temporary fix for swagger-ui executing query too fast --- .../Symfony/Bundle/Resources/public/init-swagger-ui.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Bridge/Symfony/Bundle/Resources/public/init-swagger-ui.js b/src/Bridge/Symfony/Bundle/Resources/public/init-swagger-ui.js index 051ce1f89f7..c8b81277782 100644 --- a/src/Bridge/Symfony/Bundle/Resources/public/init-swagger-ui.js +++ b/src/Bridge/Symfony/Bundle/Resources/public/init-swagger-ui.js @@ -60,8 +60,11 @@ window.onload = () => { } } - op.querySelector('.execute').click(); - op.scrollIntoView(); + // Wait input values to be populated before executing the query + setTimeout(function(){ + op.querySelector('.execute').click(); + op.scrollIntoView(); + }, 500); }); tryOutObserver.observe(document, {childList: true, subtree: true});