Project

General

Profile

Actions

Bug #94574

open

TCA type selectSingeBox and selectSingle with size > 1: selected item not in view on open

Added by Sybille Peters almost 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2021-07-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
TCA, select lists, backend, formengine, selectSingleBox
Complexity:
Is Regression:
Sprint Focus:

Description

Reproduce

  1. Use a selectSingleBox in TCA with more than 8 items (e.g. in a FlexForm)
  2. Select one item of the list on the bottom, e.g. item 9
  3. 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.

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="[{&quot;type&quot;:&quot;select&quot;,&quot;minItems&quot;:0,&quot;maxItems&quot;: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>


Files

select_html.png (5.06 KB) select_html.png Sybille Peters, 2021-07-18 05:07
select_form.png (22.4 KB) select_form.png Sybille Peters, 2021-07-18 05:08

No data to display

Actions

Also available in: Atom PDF