You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xlsform2lstsv: autocomplete dropdown is as wide as its longest option (page scrolls sideways on phones) #235
Since v0.11.0 (#226, #232), appearance=autocomplete emits question_theme_name=bootstrap_dropdown and show_search=true.
Problem
Verified on LimeSurvey 6.17.8 at a phone viewport of 390px. LimeSurvey's bootstrap_dropdown theme renders data-width='auto' while its width_entry attribute is unset or false. bootstrap-select then sizes the closed dropdown to the longest option. With a long list (12,243 municipality names) the button is 885px wide, and the whole page scrolls horizontally on phones.
Proposed fix
Emit width_entry=true as well (theme attribute: "width of dropdown = currently selected entry"). Measured with it set: the button is 176px wide with nothing selected and 366px with a long name selected.
Registry: the autocomplete appearance's lsQuestionTheme gets width_entry: true next to show_search.
width_entry is added to the known attribute columns.
Reverse path: TSVs made with 0.11.0 carry show_search=true but no width_entry. They must still read back as autocomplete, so width_entry is only emitted and not used to identify the appearance.
Known limit
The open menu is still as wide as the longest option. Fixing that needs theme CSS and is out of scope here.
Activity