Skip to content

@blaze folding breaks Flux <flux:select> — uncaught _activatable TypeError destroys all selects on the page #186

Description

@dfkaraten

What happens

After installing livewire/blaze (with no other changes), every <flux:select> / dropdown on a page becomes unstyled and unselectable. The console shows an uncaught error thrown from flux.js:

Uncaught TypeError: Cannot read properties of undefined (reading 'activate')
    at refresh (flux.js:5790)
    at displayEmptyAndCreateOptions (flux.js:5845)
    at HTMLElement.mount (flux.js:5648)

The throw aborts the rest of flux.js initialization, so all Flux selects on the page lose their JS behavior/styling — not just the offending one.

Trigger

A <flux:select searchable> that contains a <flux:select.option.create> and is empty on first load (e.g. a backend-searched picker whose options only populate after the user types):

<flux:select searchable variant="listbox" wire:model="categoryId">
    {{-- options come from a backend search; empty on first paint --}}
    <flux:select.option.create wire:click="startCategoryCreate">Create new</flux:select.option.create>
</flux:select>

Internally, the parent <ui-options>.mount() runs displayEmptyAndCreateOptions() and reaches create._activatable.activate(true) before the child <ui-option-create> custom element has mounted (so _activatable is still undefined).

It is NOT the fold layer

I published flux/select/options.blade.php and flux/select/option/create.blade.php and removed their @blaze(fold: true) directive — verified via ComponentSource that Blaze now reports fold: NULL for both. The crash persisted. Folding emits identical HTML, so it can't change the runtime custom-element mount order; the breakage comes from Blaze's compile/memo layer changing how Livewire morphs / the element connect–disconnect lifecycle. Confirmed by toggling BLAZE_ENABLED=false — selects work again immediately.

Workaround

BLAZE_ENABLED=false (or removing livewire/blaze) fully resolves it. There's no per-component / per-layer opt-out that helps, since fold isn't the cause.

Related

Versions

  • livewire/blaze v1.0.12
  • livewire/flux + flux-pro v2.14.1 (also reproduces on v2.15.0 — flux.js still unguarded, select views still ship @blaze(fold: true))
  • livewire/livewire v4.3.1
  • Laravel 13, PHP 8.4, Tailwind 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions