Bug 26695 - Set focus for cursor to login box on the login popup modal
Summary: Set focus for cursor to login box on the login popup modal
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 16:10 UTC by Barbara Johnson
Modified: 2021-06-14 21:33 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26695: Add modal "shown" event to set cursor focus (1.37 KB, patch)
2020-10-19 16:33 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26695: Add modal "shown" event to set cursor focus (1.43 KB, patch)
2020-10-19 18:43 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26695: Add modal "shown" event to set cursor focus (1.49 KB, patch)
2020-10-20 13:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2020-10-15 16:10:47 UTC
When a patron logs in to the OPAC using the login popup modal they have to click in the login box so that they can enter their information.  It would easier and quicker for patrons if the focus for the cursor would default to the login box so that they could just begin typing and eliminate the extra click.
Comment 1 Owen Leonard 2020-10-19 16:33:30 UTC
Created attachment 112001 [details] [review]
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.
Comment 2 ByWater Sandboxes 2020-10-19 18:43:31 UTC
Created attachment 112008 [details] [review]
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>
Comment 3 Katrin Fischer 2020-10-20 13:21:18 UTC
Created attachment 112035 [details] [review]
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>
Comment 4 Jonathan Druart 2020-11-03 09:58:56 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-11-16 20:58:15 UTC
enhancement will not be backported to 20.05.x