Bug 30248 - Multiple Select elements randomly have small width
Summary: Multiple Select elements randomly have small width
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-08 16:59 UTC by Christopher Brannon
Modified: 2023-02-14 00:48 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
advanced_search (32.57 KB, image/png)
2022-03-15 14:06 UTC, Barbara Johnson
Details
suggestions (17.98 KB, image/png)
2022-03-15 14:08 UTC, Barbara Johnson
Details
small_width (53.00 KB, image/png)
2022-03-15 14:08 UTC, Barbara Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2022-03-08 16:59:45 UTC
I have seen random reports from some Koha users that the select2 elements will sometimes not show in the admin preferences.  So far, this has been limited to Chrome, but not consistently.  I have seen this on my own computer.  Our test server will show the element correctly, but our production server will not.  And when ByWater looks at the same element on the same server with the same version of browser, it looks fine.  If I look at the same page in Firefox it looks fine.

The element is there, but it has a defined width of 2.22222px.

I am suspect of the changes made in bug 28611.

I am suspecting that some computers load the page too fast, and the width is being set before there is any data in the element, and therefore extremely small.  If I change the width in CSS to a fixed width, it shows and works properly.

This is a difficult issue to replicate and figure out on my end.
Comment 1 Katrin Fischer 2022-03-08 22:56:45 UTC
Can you give an example of where Select2 is used in Admin preferences? I am only aware of the usage in Cataloguing (items, authorities and bibliographic records). Does the problem appear there as well?
Comment 2 Lisette Scheer 2022-03-09 17:32:19 UTC
(In reply to Katrin Fischer from comment #1)
> Can you give an example of where Select2 is used in Admin preferences? I am
> only aware of the usage in Cataloguing (items, authorities and bibliographic
> records). Does the problem appear there as well?

The following sys prefs is where I see the issue, pretty consistently in the test server and occasionally in my production server. 

None of them appear to be select_2s but I might just be missing it. 

ArticleRequestsMandatoryFields
ArticleRequestsMandatoryFieldsItemOnly
ArticleRequestsMandatoryFieldsRecordOnly
BatchCheckoutsValidCategories
MarkLostItemsAsReturned
OPACHoldsIfAvailableAtPickupExceptions
CoceProviders
SocialNetworks
OPACSuggestionMandatoryFields
OPACSuggestionUnwantedFields
AutoShareWithMana
Comment 3 Owen Leonard 2022-03-14 19:15:04 UTC
These use a different plugin: Multiple Select (https://multiple-select.wenzhixin.net.cn/).

I don't see the described problem, so if someone is able to better isolate the conditions that cause it please let us know.
Comment 4 Barbara Johnson 2022-03-15 14:06:47 UTC
Created attachment 131725 [details]
advanced_search
Comment 5 Barbara Johnson 2022-03-15 14:07:47 UTC
I have encountered this as well when using Chrome. I've attached some examples examples from the koha-US demo site.
Comment 6 Barbara Johnson 2022-03-15 14:08:30 UTC
Created attachment 131726 [details]
suggestions
Comment 7 Barbara Johnson 2022-03-15 14:08:58 UTC
Created attachment 131727 [details]
small_width
Comment 8 Christopher Brannon 2022-03-15 16:18:39 UTC
(In reply to Owen Leonard from comment #3)
> These use a different plugin: Multiple Select
> (https://multiple-select.wenzhixin.net.cn/).
> 
> I don't see the described problem, so if someone is able to better isolate
> the conditions that cause it please let us know.

Sorry for the confusion on the type of dropdown.
Comment 9 Christopher Brannon 2022-04-07 15:33:29 UTC
The issue seems to have died down.  I am not seeing it at the moment while I have my CSS workaround removed.

However, it seems to be limiting the width to 275px currently.  This cuts off the full description in the dropdown when closed.

I think some work needs to be done to determine the length of both the description and the contents and resize to the longest line so we can read everything.
Comment 10 Owen Leonard 2022-05-05 13:59:15 UTC
(In reply to Christopher Brannon from comment #9)
> However, it seems to be limiting the width to 275px currently.  This cuts
> off the full description in the dropdown when closed.

Can you share an example?
Comment 11 Manos PETRIDIS 2022-06-05 15:25:34 UTC
Encountered this very bug today, in CoceProviders drop-down list.
Upgrading from 21.11.05-1 to 22.05.00-1 seems to have fixed it.
Comment 12 Christopher Brannon 2023-02-14 00:48:43 UTC
We've had our workaround disabled to compensate for this for a while.  This may no longer be an issue.  We are currently in 22.05.