#109730selectMultipleSideBySide: filter textfield does not hide non-matching options in Safari (WebKit ignores `hidden` on <option>)
Description
WebKit/Safari does not honour the hidden attribute (nor display: none / visibility: hidden via CSS) on <option> and <optgroup> elements inside a native <select>. This is a long-standing WebKit limitation, see <a href="https://bugs.webkit.org/show_bug.cgi?id=98169">WebKit bug #98169</a>.</select></optgroup></option>
As a result the filter has no visible effect in Safari, even though the JavaScript executes correctly.
Suggested fix
The only reliable cross-browser way to hide <option> elements in Safari is to remove them from the DOM (and re-insert them when they match the filter again). A possible approach:</option>
- On first filter call, snapshot the original list of options (parent + nextSibling) so the original order can be restored.
- For each option:
** if it matches → ensure it is attached to its parent at the correct position;
** if it does not match → option.remove().
- Apply the same logic to <optgroup> containers (remove an optgroup if it has no matching options left).</optgroup>
Setting option.disabled = true in addition to hidden is not sufficient: disabled options are still rendered and just appear
greyed-out, which is not the intended UX.
Affected versions
Reproduced on TYPO3 12.4.45 with Safari 17 on macOS.
Environment
- TYPO3: 12.4.45
- Browser: Safari (any current version on macOS / iOS / iPadOS)
- Unaffected: Chrome, Edge, Firefox
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 5
-
Garvin Hicking changed category priority
Should haveCould have <span data-processor="relativetime" data-value="2026-04-30T05:41:24+00:00" > 04/30/26, 05:41 </span> -
Garvin Hicking commented <span data-processor="relativetime" data-value="2026-04-30T05:42:34+00:00" > 04/30/26, 05:42 </span>
-
Florian Grell commented <span data-processor="relativetime" data-value="2026-04-30T07:18:18+00:00" > 04/30/26, 07:18 </span>
Garvin Hicking wrote in #note-2:
> I think the webkit bug linked here is not the right one?You are right. It is propably this one: https://bugs.webkit.org/show_bug.cgi?id=8351
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-05-05T01:48:19+00:00" > 05/05/26, 01:48 </span>duplicate of #99790 and closing for the same reason. currently nothing we can do here
-
Georg Ringer changed Duplicates #99790 <span data-processor="relativetime" data-value="2026-05-05T01:48:32+00:00" > 05/05/26, 01:48 </span>
I think the webkit bug linked here is not the right one?