Losing focus on TextInput class in actions form.

I have a scenario, not sure if it is a bug or I am missing something, to be honest.

Group::make()->schema([
     Select::make('projectId')
         ->label('Project')
         ->options(function () {
             return Cache::remember('projects', 60, function() {
                 return Project::all()->pluck('name', 'id');
             });
         })
         ->searchable()
         ->preload()
         ->required(),

     Select::make('taskId')
         ->label('Task')
         ->options(function () {
             return Cache::remember('tasks', 60, function() {
                 return Task::all()->pluck('name', 'id');
             });
         })
         ->searchable()
         ->preload()
         ->required(),

     Textarea::make('notes')
        ->required()
        ->rows(4)
        ->columnSpan(2),

     TextInput::make('starts_at')
         ->required()
         ->numeric()
         ->maxLength(4)
         ->minLength(4)
         ->live(debounce: 500)
         ->afterStateUpdated(function (Set $set, ?string $state){
             if (strlen($state) === 4) {
                 return $set('starts_at', $this->formatTime($state));
             }
         }),

     TextInput::make('ends_at')
         ->required()
         ->numeric()
         ->maxLength(4)
         ->minLength(4)
         ->live(debounce: 500)
         ->afterStateUpdated(function (Set $set, ?string $state){
             if (strlen($state) === 4) {
                 return $set('ends_at', $this->formatTime($state));
             }
         }),
 ])->columns(2)


I have a pretty basic form group within an action the problem comes around when I type in notes and then start to add a start at time, when the state is updated the focus of the input is lost.

It only happens when I update notes, and then start at. Hoping someone can say I have done something wrong rather than me making a whole bug report.

~screenshot just shows where it lost its focus. at the time of typing out a starts_at
Screenshot_2023-08-01_at_21.26.41.png
Was this page helpful?