From da1cce035a8ddebfdff99087892faa4c21569325 Mon Sep 17 00:00:00 2001 From: zjean Date: Wed, 10 Feb 2016 19:39:10 +0100 Subject: [PATCH] Focus the first visible form field in the guest area. --- public/js/guest.js | 6 ++++++ resources/views/layout/guest.twig | 1 + 2 files changed, 7 insertions(+) create mode 100644 public/js/guest.js diff --git a/public/js/guest.js b/public/js/guest.js new file mode 100644 index 0000000000..7ba3e6bed9 --- /dev/null +++ b/public/js/guest.js @@ -0,0 +1,6 @@ +$(function () { + "use strict"; + + // Focus first visible form element. + $("form input:enabled:visible:first").first().select() +}); \ No newline at end of file diff --git a/resources/views/layout/guest.twig b/resources/views/layout/guest.twig index 95fdcf293a..6d65f3a20c 100644 --- a/resources/views/layout/guest.twig +++ b/resources/views/layout/guest.twig @@ -48,6 +48,7 @@ + {% if env('ANALYTICS_ID','') != '' %}