From 9f790f3aa186a69177c36e2505172fe3743ba3eb Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Sun, 25 Jan 2015 16:16:20 +0000 Subject: [PATCH] Potential fix for the ghost, killing the frontend test from time to time. Go Jenkins, find it --- js/apps/system/aardvark/frontend/js/views/modalView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/frontend/js/views/modalView.js b/js/apps/system/aardvark/frontend/js/views/modalView.js index 8006764e7c..d0597e0254 100644 --- a/js/apps/system/aardvark/frontend/js/views/modalView.js +++ b/js/apps/system/aardvark/frontend/js/views/modalView.js @@ -335,7 +335,12 @@ //if input-field is available -> autofocus first one var focus = $('#modal-dialog').find('input'); if (focus) { - setTimeout(function() {$(focus[0]).focus();}, 800); + setTimeout(function() { + var focus = $('#modal-dialog').find('input'); + if (focus) { + $(focus[0]).focus(); + } + }, 800); } },