[Bug 11905] New: when editing item, cursor is positioning in search box and not to item
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Bug ID: 11905 Summary: when editing item, cursor is positioning in search box and not to item Change sponsored?: --- Product: Koha Version: 3.12 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: marjorie.barry-vila@ccsr.qc.ca QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Created attachment 25914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25914&action=edit search box edit item Hi, In 3.12 (or 3.10), a catalog search box has been added to edit item page. When i click on edit, cursor is positioning in search box and not to the item i want to edit. If i have 100 items, i have to scroll to the end of the page. Anyone can test it? Regards, Marjorie -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org --- Comment #1 from Nick Clemens <nick@quecheelibrary.org> --- I am seeing the same thing in 3.12 and 3.14. I think the script on the page is the issue, setting the focus in search and overriding the anchor, with JS disabled the page loads as expected. This bit seems to be it: <script>$(document).ready(function(){ $("input[name=q]:eq(0)").focus(); });</script> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #2 from Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> --- (In reply to Nick Clemens from comment #1)
I am seeing the same thing in 3.12 and 3.14.
I think the script on the page is the issue, setting the focus in search and overriding the anchor, with JS disabled the page loads as expected.
This bit seems to be it:
<script>$(document).ready(function(){ $("input[name=q]:eq(0)").focus(); });</script>
Thanks Nick for explanation. Do you know a script js to remove focus? Marjorie -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #3 from Nick Clemens <nick@quecheelibrary.org> --- (In reply to Marjorie Barry-Vila from comment #2)
(In reply to Nick Clemens from comment #1)
Thanks Nick for explanation. Do you know a script js to remove focus?
Marjorie
From what I see the intranetusersjs loads before the script on the page, so you have to execute on window load to be able to steal focus. Below should work
$(window).load(function (){ $('[id^="tag_952_subfield_0_"]').focus(); }); I think the bigger issue though is that cataloging-search.inc is set to take focus on every page where present. The link created when you click to edit an item has an anchor at the end and I am guessing the intention was, at one point, to set the focus to the edititem id once an item was being edited. I do think that is the more useful fonctionality Bug 11325 seems to be centered around the same issue with focus on the search box. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #4 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 28166 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28166&action=edit Patch to remove js from cataloging-search -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #5 from Nick Clemens <nick@quecheelibrary.org> --- more description: Currently the cataloging-search.inc has js that takes focus on any page it is added to. I think that focus should be in the individual templates for each page rather than in the search for all. Above patch attempts to resolve this issue by removing the focus js from cataloging-search.inc -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |nick@quecheelibrary.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.12 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #6 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28166|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #7 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 28666 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28666&action=edit Bug 11905 - when editing item, cursor is positioning in search box and not to item The cataloging-search.inc had js which set focus to the cataloging search box. I believe the focus should be determined by the page template and not always to this search. I simply removed the js. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #8 from Juhani Seppälä <jseppal@student.uef.fi> --- Created attachment 28668 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28668&action=edit [SIGNED-OFF] Bug 11905 - when editing item, cursor is positioning in search box and not to item The cataloging-search.inc had js which set focus to the cataloging search box. I believe the focus should be determined by the page template and not always to this search. I simply removed the js. Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- The include file cataloging-search.inc is used in 3 templates. I am not sure this is the good way to do. Maybe should you move the js code from the include file to the 2 other tt files (not sure it is useful for merge.tt). Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #10 from Nick Clemens <nick@quecheelibrary.org> --- Agreed, I thought about adding to the others when I removed it, it doesn't hurt on merge.tt as there is no other place for focus so adding the js into both. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25914|0 |1 is obsolete| | Attachment #28666|0 |1 is obsolete| | Attachment #28668|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 28717 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28717&action=edit Patch to remove js from cataloging-search and add to individual tt files This patch removes js that sets focus to the cataloging search from the cataloging-search.inc to allow focus on additems.pl to be set to the add items form. The js is added into merge.tt and addbooks.tt to keep focus on the cataloging search there. Test plan: 1. Apply patch 2. Go to the edit items screen for any record and verify that focus is not set to the cataloging search 3. Add two items to a list and merge them, verify focus is set to cataloging search box 4. Go to Cataloging and verify that focus is set to cataloging search box -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paola.rossi@cineca.it --- Comment #12 from Paola Rossi <paola.rossi@cineca.it> --- I've applied against master 3.17.00.007 Everything's OK. So I pass the patch to "Signed Off" status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28717|0 |1 is obsolete| | --- Comment #13 from Paola Rossi <paola.rossi@cineca.it> --- Created attachment 28837 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28837&action=edit Bug 11905 Patch to remove js from cataloging-search and add to individual tt files -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28839 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28839&action=edit Bug 11905 - when editing item, cursor is positioning in search box and not to item cataloging-search.inc had embedded js to set focus into the search box. This patch removes that js from the cataloging-search.inc and adds it into addbooks.tt and merge.tt to set focus on those pages and allow focus to be set to the edit items form on additem.tt Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28837|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Nick! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11905 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14409 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org