Summary: | Select2 prevents correct tag expand/minimize functionality | ||
---|---|---|---|
Product: | Koha | Reporter: | Oleg Vasylenko <synapse.ova> |
Component: | Cataloging | Assignee: | Oleg Vasylenko <synapse.ova> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, josef.moravec, kyle, m.de.rooy, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 13501 | ||
Bug Blocks: | 18119 | ||
Attachments: |
Bug 17988: add attribute check
[SIGNED-OFF] Bug 17988 - Select2 prevents correct tag expand/minimize functionality Bug 17988 - Select2 prevents correct tag expand/minimize functionality Bug 17988: Add a comment to explain the line |
Description
Oleg Vasylenko
2017-01-25 09:54:02 UTC
Created attachment 59543 [details] [review] Bug 17988: add attribute check The following patch adds check for the needed attribute existance. Created attachment 59758 [details] [review] [SIGNED-OFF] Bug 17988 - Select2 prevents correct tag expand/minimize functionality Overview: Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. Because of that, expanding fields to show all hidden subfields does not work properly. Steps to Reproduce: 1. Open some book in the editor or create new (cataloguing/addbiblio.pl) 2. Try to minimize or expand fields, that have among subfields the following: — Thesaurus driven subfield → subfield with Select2 — Hidden subfield. Actual Results: — some fields become hidden, some not, and vice versa — in the console, you'll see «Uncaught TypeError: Cannot read property 'match' of null» Expected Results: — all subfields should minimize/maximize completely Additional Information: This happens because Select2 adds some divs, that do not have ID property. The following patch adds check for the needed attribute existance. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> I was able to reproduce the problem with field 942, with this patch it is OK Created attachment 59770 [details] [review] Bug 17988 - Select2 prevents correct tag expand/minimize functionality Overview: Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. Because of that, expanding fields to show all hidden subfields does not work properly. Steps to Reproduce: 1. Open some book in the editor or create new (cataloguing/addbiblio.pl) 2. Try to minimize or expand fields, that have among subfields the following: — Thesaurus driven subfield → subfield with Select2 — Hidden subfield. Actual Results: — some fields become hidden, some not, and vice versa — in the console, you'll see «Uncaught TypeError: Cannot read property 'match' of null» Expected Results: — all subfields should minimize/maximize completely Additional Information: This happens because Select2 adds some divs, that do not have ID property. The following patch adds check for the needed attribute existance. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 59771 [details] [review] Bug 17988: Add a comment to explain the line Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master for 17.05, thanks Oleg, Jonathan! These patches have been pushed to 16.11.x and will be in 16.11.04. Follow up breaks the collapsing/uncollapsing of the fields - I think # is not allowed in Javascript for comments. Needs to be fixed on master - I will remove the second patch from my branch before pushing it up. It would be great, if another bug connected with Select2 would also be pushed to master — Bug 17780 It gives us a lot of problems, because authority records either are not added at all, or added without ID (and so would not be updated). Hi Oleg, we will need a sign-off there first - I have upped the severity a bit! Silly me, comment in JS is not #! (In reply to Katrin Fischer from comment #7) > These patches have been pushed to 16.11.x and will be in 16.11.04. Pushed to 16.05.x, for 16.05.10 release (In reply to Mason James from comment #12) > (In reply to Katrin Fischer from comment #7) > > These patches have been pushed to 16.11.x and will be in 16.11.04. > > Pushed to 16.05.x, for 16.05.10 release Mason, you forgot bug 18119! (In reply to Jonathan Druart from comment #13) > (In reply to Mason James from comment #12) > > (In reply to Katrin Fischer from comment #7) > > > These patches have been pushed to 16.11.x and will be in 16.11.04. > > > > Pushed to 16.05.x, for 16.05.10 release > > Mason, you forgot bug 18119! thanks!, i've pushed 18119 |