Skip to content

fix: Prevent concurrent FileUpload init() calls#19197

Merged
danharrin merged 2 commits intofilamentphp:4.xfrom
People-Sea:fix/file-upload-concurrent-init
Feb 4, 2026
Merged

fix: Prevent concurrent FileUpload init() calls#19197
danharrin merged 2 commits intofilamentphp:4.xfrom
People-Sea:fix/file-upload-concurrent-init

Conversation

@People-Sea
Copy link
Contributor

@People-Sea People-Sea commented Feb 4, 2026

Description

#19154 introduced a ResizeObserver to handle visibility changes, but since init() is async, the observer can fire during await this.getFiles() and trigger a second init() before the first completes. This race condition corrupts FilePond's internal state, causing a console error (though the component still works).

Added an isInitializing flag to guard against concurrent init() calls.

Visual changes

before

before.mov

after

after.mov

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Feb 4, 2026
@People-Sea People-Sea marked this pull request as ready for review February 4, 2026 07:16
@danharrin danharrin added the bug Something isn't working label Feb 4, 2026
@danharrin danharrin added this to the v4 milestone Feb 4, 2026
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Feb 4, 2026
@danharrin danharrin merged commit caa1030 into filamentphp:4.x Feb 4, 2026
23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Feb 4, 2026
@People-Sea People-Sea deleted the fix/file-upload-concurrent-init branch February 5, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants