#94574TCA type selectSingeBox and selectSingle with size > 1: selected item not in view on open
Description
Reproduce
- Use a selectSingleBox in TCA with more than 8 items (e.g. in a FlexForm)
- Select one item of the list on the bottom, e.g. item 9
- Open the form again
Same can be reproduced with selectSingle and size > 1.
Result
The list is always scrolled to the top. The selected item is not visible.
select_form.png
Expected behaviour
The selected item should be in the visible area, meaning the list should scroll down on open. This is the default behaviour using the pure HTML,e.g.
<select name="data[tt_content][366][pi_flexform][data][sDEF][lDEF][settings.selectSingleBox][vDEF][]" multiple="multiple" onchange="TBE_EDITOR.fieldChanged('tt_content','366','pi_flexform','data[tt_content][366][pi_flexform][data][sDEF][lDEF][settings.selectSingleBox][vDEF]');" id="tceforms-multiselect60f3b3b59cc51299281504" class="form-select " data-formengine-validation-rules="[{"type":"select","minItems":0,"maxItems":99999}]">
<option value="0">List option 1 [0]</option>
<option value="1">List option 2 [1]</option>
<option value="2">List option 3 [2]</option>
<option value="3">List option 3 [3]</option>
<option value="4">List option 4 [4]</option>
<option value="5">List option 5 [5]</option>
<option value="6">List option 6 [6]</option>
<option value="7">List option 7 [7]</option>
<option value="8">List option 8 [8]</option>
<option selected="selected" value="9">List option 9 [9]</option>
<option value="10">List option 10 [10]</option>
</select>
select_html.png
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] TCA type selectSingeBox and selectSingle with size > 1: selected item not in view on open Resolves: #94574 Releases: main