Files
compiler-explorer/static
PartoufandClaude Opus 5 0932ef0c56 Fix "DROPDOWN: Option boundary provided type undefined" TypeError
The font size button is the only dropdown in the codebase that supplies a
`boundary` option, and it did so via `data-bs-boundary="viewport"`. Bootstrap
builds a dropdown's config as `{...Default, ...dataAttributes, ...config}`, so
the data attribute is spread *over* the default. If a browser enumerates
`bsBoundary` in `element.dataset` but hands back `undefined` when reading it,
`boundary` becomes `undefined`, overriding the `'clippingParents'` default, and
`_typeCheckConfig` throws against the expected `(string|element)`.

Pass the option explicitly in JS instead: an explicit config object is spread
last and always wins, so `boundary` is guaranteed to be defined no matter what
`dataset` returns.

Also drops `data-bs-flip="false"`, which Bootstrap 5 does not have as a dropdown
option at all - it was a leftover from Bootstrap 4.

Behaviour is unchanged: Popper still receives `boundary: 'viewport'` for its
preventOverflow modifier, so the menu keeps escaping its pane. The cast is
needed because @popperjs/core types `Boundary` as `Element | Element[] |
'clippingParents'` even though `getClippingRect` handles the `'viewport'`
string at runtime.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 16:16:01 +02:00
..
2025-10-28 09:45:26 +01:00
2026-06-02 12:19:29 -05:00
2026-07-02 18:26:35 +01:00
2026-06-02 12:19:29 -05:00
2025-07-28 10:34:46 -05:00
2025-04-24 12:10:37 -05:00