[Bug 28903] New: Tab key and drop-down menu in item module
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Bug ID: 28903 Summary: Tab key and drop-down menu in item module Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: pierre.genty@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Hi, Since 20.11 it is no longer possible to pull down a menu, select and jump to the next field with the tab key when adding an item. You have to click on the drop-down menu. It seems to happen only when adding/editing an item. Tab key works well with borrower module for instance. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- If I understand correctly, this is the difference between how an HTML <select> behaves and how a Select2 dropdown (like on additem.pl) works: HTML <select>: 1. Tab to <select>. 2. Use arrow key to highlight option. 3. Hit tab key -> Option is selected. * ENTER key also works. 4. Hit tab key -> Focus moves to next input. Select2 dropdown: 1. Tab to field. 2. Hit ENTER. 3. Use arrow key to highlight option. 4. Hit ENTER -> Option is selected. * TAB key does NOT work to select an option. 5. Hit tab key -> Focus moves to next input. If that's correct, it looks like the tab key difference can be changed by setting a new default in select2.js: "selectOnClose" -> true In terms of having the same number of interactions (key presses or clicks), it would be nice if one didn't have to hit ENTER to activate a Select2 menu. I don't think that's currently configurable. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
From a keyboard user perspective may be harder to explain?
-- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I don't understand your comment Marcel. The change would be harder to explain? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #3)
I don't understand your comment Marcel. The change would be harder to explain?
Yeah too short. The fact that one form has a dropdown type A and another one dropdown type B, and you should press X on form A but press Y on form B is harder to explain. For users it may just be a dropdown.. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Owen Leonard from comment #1)
If that's correct, it looks like the tab key difference can be changed by setting a new default in select2.js: "selectOnClose" -> true
Pierre, does Owen's suggestion answer your need?
In terms of having the same number of interactions (key presses or clicks), it would be nice if one didn't have to hit ENTER to activate a Select2 menu. I don't think that's currently configurable.
You can open the dropdown list hitting "space" in both situations. So if we turn selectOnClose on, we are good. Am I missing something? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like it can be tested by adding in syspref IntranetUserJS : $(document).ready(function() { $.fn.select2.defaults.set("selectOnClose", "true" ); }); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #7 from pierre.genty@biblibre.com --- Fridolin, I added this code in IntranetUserJS but it changes nothing for me (still have to click on the menu or hit Enter). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 124170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124170&action=edit Bug 28903: Tab key and drop-down menu in item module This patch changes the default configuration of Select2 menus so that the tab key can be used to choose an option which has been highlighted using arrow keys. To reproduce the behavior this fixes, open a page with Select2 menus, e.g. additem.pl: 1. Tab to a Select2 field (withdrawn, lost, damaged, etc.) 2. Hit ENTER. 3. Use arrow key to highlight option. 4. Hit TAB -> Option is NOT selected. 5. Hit tab key -> Focus moves to next input. Apply the patch and test again. At step 4 the tab key should work to select the option you've highlighted. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | Version|20.11 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to pierre.genty from comment #7)
Fridolin, I added this code in IntranetUserJS but it changes nothing for me (still have to click on the menu or hit Enter).
Are you OK with test plan ? For me it is the wanted behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 pierre.genty@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #10 from pierre.genty@biblibre.com --- With the patch, the Tab key does now select the option. Thanks ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #11 from pierre.genty@biblibre.com --- In 19.11, the arrow keys use to directly pull down the menu - it wasn't necessary to hit Enter. Besides, Tab key use to select the option AND move to next input. Now, it selects the option but stays in the same menu. Would it be possible to easily change this ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- (In reply to pierre.genty from comment #11)
In 19.11, the arrow keys use to directly pull down the menu
Confirmed. This appears to be a known bug in Select2: https://github.com/select2/select2/issues/3472. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi Status|Signed Off |Failed QA --- Comment #13 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Proposed fix would select the option if you just hover your mouse cursor over the option and then click outside the box after that --> will cause most definitely unintended changes and was not the previous behaviour. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwsdonna@gmail.com --- Comment #14 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 29558 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124170|1 |0 is patch| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124170|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28903 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Owen Leonard from comment #12)
(In reply to pierre.genty from comment #11)
In 19.11, the arrow keys use to directly pull down the menu
Confirmed. This appears to be a known bug in Select2: https://github.com/select2/select2/issues/3472.
There seems to be a JS snipped type workaround on the github bug - maybe something that could help us here? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org