Flux:select listbox - choosing option causes scroll
Open
Nobody has claimed this yet.
- Dominant language
- Blade
- Stars
- 977
- Forks
- 112
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 21
Description
Flux version
2.16.0
Livewire version
4.4.0
Tailwind version
4.3.3
Browser and Operating System
safari on macos
What is the problem?
When choosing option in flux:select listbox component in tabs the page jumps.
Happens on safari, macOS.
Tried on chrome, macOS - works OK.
Code snippets to replicate the problem
<?php
use Livewire\Component;
new class extends Component {
#[\Livewire\Attributes\Url]
public string $tab = 'general';
}; ?>
<div>
<flux:heading size="xl" level="1">{{ __('Schedule Session') }}</flux:heading>
<flux:text
class="mt-2 mb-6">{{ __('Put a lesson in the diary: who is training what, with whom, and when.') }}</flux:text>
<flux:tab.group>
<flux:tabs wire:model="tab">
<flux:tab name="general" icon="clipboard-list">{{ __('General') }}</flux:tab>
</flux:tabs>
{{-- :selected or the server renders the panel hidden and the page jumps to the top — see .ai/rules/views.md. --}}
<flux:tab.panel name="general">
{{-- Basic data ------------------------------------------------ --}}
<flux:card class="space-y-6">
<flux:heading size="lg">{{ __('Basic data') }}</flux:heading>
<div class="grid grid-cols-1 lg:grid-cols-4 gap-4">
{{--
.live because the hook behind it clears the lesson type and
lessons. A bare .blur would sync the client and never reach
the server — see the views rules.
--}}
<flux:select
wire:model.live="form.program_id"
variant="listbox"
searchable
:label="__('Training program')"
:placeholder="__('Select a program…')"
:label:badge="__('Required')"
>
@foreach(range(1,6) as $value)
<flux:select.option :value="$value">
<div class="flex items-center gap-2">
<span>{{ $value }}</span>
</div>
</flux:select.option>
@endforeach
</flux:select>
</div>
</flux:card>
<div class="h-250! block!" style="height: 1000px;">ss</div>
<div class="flex justify-end gap-3">
<flux:button variant="primary" type="submit">{{ __('Schedule session') }}</flux:button>
</div>
</flux:tab.panel>
</flux:tab.group>
</div>
Screenshots/ screen recordings of the problem
How do you expect it to work?
The page should not "jump"
Please confirm (incomplete submissions will not be addressed)
- I have provided easy and step-by-step instructions to reproduce the bug.
- I have provided code samples as text and NOT images.
- I understand my bug report will be closed if I haven't met the criteria above.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Flux select listbox inside tabs on Safari for macOS, then inspect the select and tab-panel behavior involved when an option is chosen. Done means selecting an option no longer moves the page, while the supplied Chrome behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, tailwindcss
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100