We're doing something like this to hide options that are not applicable to the current filtering string: $('#my_select_option').hide(); This applies the following CSS rule to the <option> element: display: none It turns out that IE won't hide option elements. So, that's annoying. We have a couple of choices here. We could either clone the entire list of partners, filter out the ones that don't match the search string and then use the remainder to repopulate the <option> elements. Or we could wrap the <options> in something that IE11 will apply display:none to, such as a <span> or something. However, this will lead to something that is semantically incorrect for HTML5, since a <select> can only have <option> or <optgroup> as it's children. Despite the first option feeling a bit gnarly, I'm going to go for that as it will fix the problem and not lead to broken markup.
Created attachment 97974 [details] [review] Bug 24518: Fix IE11 partner filtering This patch adopts the approach detailed in comment #1. It also fixes a couple of additional minor bugs relating to the ILL partner list: - Exclude partners with no email address, we cannot use them - Quote the "value" attribute to avoid warnings displayed by IE, they should be quoted anyway! Test plan: USE IE11 - Apply the patch - Define 3 ILL partner patrons (patrons in the category that has a code that matches the <partner_code> value in the ILL config). One patron should have no email address, the other two should have an email address - Navigate to "Place request with partners" for an ILL request - TEST: Observe that the patron with no email address is not displayed - Try filtering the list - TEST: Observe that the list filters correctly
Created attachment 100395 [details] [review] Bug 24518: Fix IE11 partner filtering This patch adopts the approach detailed in comment #1. It also fixes a couple of additional minor bugs relating to the ILL partner list: - Exclude partners with no email address, we cannot use them - Quote the "value" attribute to avoid warnings displayed by IE, they should be quoted anyway! Test plan: USE IE11 - Apply the patch - Define 3 ILL partner patrons (patrons in the category that has a code that matches the <partner_code> value in the ILL config). One patron should have no email address, the other two should have an email address - Navigate to "Place request with partners" for an ILL request - TEST: Observe that the patron with no email address is not displayed - Try filtering the list - TEST: Observe that the list filters correctly Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 100953 [details] [review] Bug 24518: Fix IE11 partner filtering This patch adopts the approach detailed in comment #1. It also fixes a couple of additional minor bugs relating to the ILL partner list: - Exclude partners with no email address, we cannot use them - Quote the "value" attribute to avoid warnings displayed by IE, they should be quoted anyway! Test plan: USE IE11 - Apply the patch - Define 3 ILL partner patrons (patrons in the category that has a code that matches the <partner_code> value in the ILL config). One patron should have no email address, the other two should have an email address - Navigate to "Place request with partners" for an ILL request - TEST: Observe that the patron with no email address is not displayed - Try filtering the list - TEST: Observe that the list filters correctly Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Did not test on I11, but regression tested ok
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.05
backported to 19.05.x for 19.0.10
Minor/normal patch will not be backported to 18.11.x series