]> git.koha-community.org Git - koha.git/commit
Bug 26695: Add modal "shown" event to set cursor focus
authorOwen Leonard <oleonard@myacpl.org>
Mon, 19 Oct 2020 15:15:13 +0000 (15:15 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 3 Nov 2020 09:57:35 +0000 (10:57 +0100)
commit7ea60c0bd94cbbcd22e88e59d95131078aa2bc50
treec25954db822be8afc8008e77370644ec79adb338
parent74aba6abb57421a8c333974d3e5a48a9c46381ea
Bug 26695: Add modal "shown" event to set cursor focus

This patch attaches a focus() call to the login modal's "shown.bs.modal"
event so that the cursor focus is set to the username field when the
login modal is displayed.

To test, apply the patch and confirm that your OPAC uses the regular
login process--not casAuthentication or GoogleOpenIDConnect.

Click the "Log in to your account" link in the header. A the login form
should appear in a modal dialog, and the focus should be on the username
field.

The same should be true if you trigger the modal from other
locations, for instance: "Log in to add tags" on the bibliographic
detail page or the tag cloud page.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/js/script.js