[Bug 17566] New: Change initial focus in item editor depending on last action
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Bug ID: 17566 Summary: Change initial focus in item editor depending on last action Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl If you have saved an existing item or added a new one, it would be nice to have the focus in the search box. In other cases, at the start of adding or editing an item, it would be good to have focus in the item fields already. This patch sets the focus in the second case on the first item input field, since focus on the first select (combo box) does not show up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Assignee|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57257&action=edit Bug 17566: Change initial focus in item editor depending on last action If you have saved an existing item or added a new one, it would be nice to have the focus in the search box. In other cases, at the start of adding or editing an item, it would be good to have focus in the item fields already. This patch sets the focus in the second case on the first item input field, since focus on the first select (combo box) does not show up. Test plan: [1] From staff detail view, click Edit items in the menu. Focus should go to item fields. [2] Save this new item. Focus on search box? [3] Click to edit this item. Focus on item fields? [4] Save again. Focus on search box again? [5] Delete this item. Focus on search box again? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57257|0 |1 is obsolete| | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57259&action=edit Bug 17566: Change initial focus in item editor depending on last action If you have saved an existing item or added a new one, it would be nice to have the focus in the search box. In other cases, at the start of adding or editing an item, it would be good to have focus in the item fields already. This patch sets the focus in the second case on the first item input field, since focus on the first select (combo box) does not show up. Test plan: [1] From staff detail view, click Edit items in the menu. Focus should go to item fields. [2] Save this new item. Focus on search box? [3] Click to edit this item. Focus on item fields? [4] Save again. Focus on search box again? [5] Delete this item. Focus on search box again? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57259|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57281&action=edit [SIGNED-OFF] Bug 17566: Change initial focus in item editor depending on last action If you have saved an existing item or added a new one, it would be nice to have the focus in the search box. In other cases, at the start of adding or editing an item, it would be good to have focus in the item fields already. This patch sets the focus in the second case on the first item input field, since focus on the first select (combo box) does not show up. Test plan: [1] From staff detail view, click Edit items in the menu. Focus should go to item fields. [2] Save this new item. Focus on search box? [3] Click to edit this item. Focus on item fields? [4] Save again. Focus on search box again? [5] Delete this item. Focus on search box again? Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I don't really like that, especially because it does not work with select. It's weird to select the 4th element (in my case) of the add item form. I'd like to get cataloguer specialist point of views. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57881&action=edit Bug 17566: [Follow-up] Initial focus on first select or input Previous patch just set the focus to the first input, because the focus on the first select does not show up in some browsers (incl FF). Joubu complained about that, which is not unreasonable :) This patch puts the focus on the first subfield (under conditions described earlier). We do not solve all browser problems here, but it still is an improvement compared to the original focus. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
I don't really like that, especially because it does not work with select. It's weird to select the 4th element (in my case) of the add item form. I'd like to get cataloguer specialist point of views.
Your concern should be dealt with in the second patch, although focus and various browsers are not my favorite topic ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- With the second patch, I don't see the focus at all. It seems to be on the first select because when I tab it selects the second select. But I cannot interact with it (select an option). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #7)
With the second patch, I don't see the focus at all. It seems to be on the first select because when I tab it selects the second select. But I cannot interact with it (select an option).
Thats a browser problem that I cannot solve. The focus is there. See commit message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Changing status to BLOCKED Anyone have a clue how to make this focus visible? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- If we want to put the focus on the first select2-styled <select> I think we have to trigger it to open: https://select2.github.io/examples.html#programmatic However, I wonder whether this bug makes too many assumptions about how catalogers want to work. In our framework the first subfield is "Withdrawn status," and that's almost never the first field the catalogers will want to change. The focus returns to the search form at the top after I have edited an item, but what if I wanted to edit another item next? I worry that this patch assumes a workflow which is not universal enough to make it appropriate. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #10)
If we want to put the focus on the first select2-styled <select> I think we have to trigger it to open:
Thanks for your feedback. Could not get it working rightaway.. Maybe for this reason: http://stackoverflow.com/questions/2562723/javascript-focus-and-select-not-w... Not spending too much time on it now.
However, I wonder whether this bug makes too many assumptions about how catalogers want to work. In our framework the first subfield is "Withdrawn status," and that's almost never the first field the catalogers will want to change.
The focus returns to the search form at the top after I have edited an item, but what if I wanted to edit another item next?
I worry that this patch assumes a workflow which is not universal enough to make it appropriate.
Yeah. You made a QAer happy :) But I must of course admit that this patch is in the 'foggy' category. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|BLOCKED |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17566 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org