Summary: | Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" | ||
---|---|---|---|
Product: | Koha | Reporter: | Tim McMahon <tmcmahon> |
Component: | Circulation | Assignee: | Lari Taskula <lari.taskula> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, gmcharlt, kyle.m.hall, lari.taskula, tomascohen, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14829 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try"
[Signed-off] Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" [PASSED QA] Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" |
Description
Tim McMahon
2015-09-22 21:11:00 UTC
*** Bug 14860 has been marked as a duplicate of this bug. *** Created attachment 42879 [details] [review] Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" The issue is that CircAutocompl loads a script element under #header_search element. When this element is missing, it also messes up the indexing, because we were calculating the indexing of the found element by subtracting one from the found element's index (to eliminate the <script> element). Thats why the shortcut key problem in this bug takes you one too to the left, because we are still subtracting one from the index even though there is no <script> element anymore. This patches selects only the div elements and gets the index from them. No subtractions needed. To test keys: 1. Set CircAutocompl system preference to Don't try. 2. Try the shortcut keys. They will work incorrectly like this: Alt+U = Search catalogue Alt+R = Check out Alt+Q = Check in 3. Set CircAutocompl system preference to Try. 4. Try the shortcut keys. They will work correctly like this: Alt+U = Check out Alt+R = Check in ALt+Q = Search catalogue 5. Apply patch 6. Repeat step 1 and 4. 7. Repeat step 3 and 4. 8. Observe that regardless of CircAutocompl, shortcut keys worked correctly. See also bug 14829 if the test plan above fails in Patrons/Cataloging modules. Created attachment 42945 [details] [review] [Signed-off] Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" The issue is that CircAutocompl loads a script element under #header_search element. When this element is missing, it also messes up the indexing, because we were calculating the indexing of the found element by subtracting one from the found element's index (to eliminate the <script> element). Thats why the shortcut key problem in this bug takes you one too to the left, because we are still subtracting one from the index even though there is no <script> element anymore. This patches selects only the div elements and gets the index from them. No subtractions needed. To test keys: 1. Set CircAutocompl system preference to Don't try. 2. Try the shortcut keys. They will work incorrectly like this: Alt+U = Search catalogue Alt+R = Check out Alt+Q = Check in 3. Set CircAutocompl system preference to Try. 4. Try the shortcut keys. They will work correctly like this: Alt+U = Check out Alt+R = Check in ALt+Q = Search catalogue 5. Apply patch 6. Repeat step 1 and 4. 7. Repeat step 3 and 4. 8. Observe that regardless of CircAutocompl, shortcut keys worked correctly. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 42982 [details] [review] [PASSED QA] Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" The issue is that CircAutocompl loads a script element under #header_search element. When this element is missing, it also messes up the indexing, because we were calculating the indexing of the found element by subtracting one from the found element's index (to eliminate the <script> element). Thats why the shortcut key problem in this bug takes you one too to the left, because we are still subtracting one from the index even though there is no <script> element anymore. This patches selects only the div elements and gets the index from them. No subtractions needed. To test keys: 1. Set CircAutocompl system preference to Don't try. 2. Try the shortcut keys. They will work incorrectly like this: Alt+U = Search catalogue Alt+R = Check out Alt+Q = Check in 3. Set CircAutocompl system preference to Try. 4. Try the shortcut keys. They will work correctly like this: Alt+U = Check out Alt+R = Check in ALt+Q = Search catalogue 5. Apply patch 6. Repeat step 1 and 4. 7. Repeat step 3 and 4. 8. Observe that regardless of CircAutocompl, shortcut keys worked correctly. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Patch pushed to master. Thanks Lari! Pushed to 3.20.x will be in 3.20.5 |