[Bug 25680] New: When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 Bug ID: 25680 Summary: When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: timothy_alexis.vass@ub.lu.se QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 105571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105571&action=edit Expected result: The focused field being clearly in view. Steps to reproduce: login: demo password: demo - http://koha.adminkuhn.ch:8080/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=K - Fill in Surname and Save. Result: Focus is set on input with id="cardnumber". Bug: The object is out of view. Expected result: The focused field being clearly in view. -- 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=25680 --- Comment #1 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- $("#entryform").validate({ focusInvalid: false, invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { window.scrollTo(0, 0); validator.errorList[0].element.focus(); window.scrollBy(0,$(window).height()/1.618); } }, This will set the element at the "golden section" in the window. Can anyone think of a simpler way to do it? -- 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=25680 --- Comment #2 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Above code is in koha-tmpl/intranet-tmpl/prog/js/members.js -- 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=25680 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I don't find that the above code does what you want it to. Testing in Firefox and Chrome on Mac the result is that the first invalid field is still hidden at the top of the page by the floating toolbar. Also: If you submit your change as a patch it will be easier for folks to test it. -- 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=25680 --- Comment #4 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Created attachment 105574 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105574&action=edit $("#entryform").validate focuses invalid field clearly in view. -- 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=25680 --- Comment #5 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Created attachment 105575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105575&action=edit Bug 25680 - When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view. This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Change sponsored?|--- |Sponsored Status|NEW |Needs Signoff -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105575|0 |1 is obsolete| | --- Comment #6 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Created attachment 105576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105576&action=edit Bug 25680 - When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view. This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105576|0 |1 is obsolete| | --- Comment #7 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Created attachment 105577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105577&action=edit Bug 25680 - When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view. This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. -- 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=25680 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com --- Comment #8 from Lisette Scheer <lisetteslatah@gmail.com> --- In both my production server and a Bywater Sandbox the behavior already works. If I have a required field that isn't filled out it gets centered on the screen without applying the patch. I also tested to make sure it will do this if the "save" toolbar is covering the required field. Lisette -- 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=25680 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've tried to test this. I've left off cardnumber and it didn't center, but only appeared at the bottom of the screen. I was using Firefox, wonder if the browser makes a difference? I wanted to compare with the patch, but it currently doesn't apply. -- 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=25680 --- Comment #10 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- (In reply to Katrin Fischer from comment #9)
I was using Firefox, wonder if the browser makes a difference?
In this situation does. :)
I wanted to compare with the patch, but it currently doesn't apply.
Is there an error? -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105577|0 |1 is obsolete| | --- Comment #11 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- Created attachment 105619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105619&action=edit Bug 25680 - When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view. This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105574|0 |1 is obsolete| | -- 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=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #12 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- (In reply to Katrin Fischer from comment #9)
I wanted to compare with the patch, but it currently doesn't apply.
There was an old attachment that I had to obsolete. Please try it again now with the correct one. -- 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=25680 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=25680 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 105774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105774&action=edit Bug 25680: When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- 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=25680 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105619|0 |1 is obsolete| | -- 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=25680 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|When adding a new patron |When adding a new patron |and missing to fill a |and missing to fill a |field, on saving, the |field, on saving, the |invalidFocus should show |invalidFocus should show |the focused field clearly |the focused field clearly |in view. |in view --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I could see the issue now with the field not being in view, maybe the difference was activating a second language for the staff interface. I've fixed the commit line (it has to be: Bug XXXX: for the QA tools to be happy) and signed off. -- 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=25680 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |timothy_alexis.vass@ub.lu.s |ity.org |e --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Timothy, when starting work on a bug, please don't forget to assign it to yourself. -- 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=25680 --- Comment #16 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- (In reply to Katrin Fischer from comment #15)
Hi Timothy, when starting work on a bug, please don't forget to assign it to yourself.
Thank you Katrin for reminding me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |nick@bywatersolutions.com --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- This works for me in Firefox, but fails in both Chrome and Chromium - it works for surname, but cardnumber ends up under the save bar -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 --- Comment #18 from Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> --- (In reply to Nick Clemens from comment #17)
This works for me in Firefox, but fails in both Chrome and Chromium - it works for surname, but cardnumber ends up under the save bar
Thank you Nick for sending a video showing what happens. Problem at this point is that the interpretation of this command is different between Chrome and Firefox: validator.errorList[0].element.focus(); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|BLOCKED |CLOSED CC| |kevin.carnes@ub.lu.se -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org