Skip to content

Conversation

@alexwarren
Copy link
Contributor

No description provided.

The issue was that iOS Safari requires file input clicks to happen
synchronously within the same call stack as the user's gesture. The
previous implementation showed a modal dialog before opening the file
picker, which broke the user gesture chain on iOS Safari.

Changes:
- Refactored file-handler.ts to separate file selection from file loading
- Created new selectFile() function that returns file content without
  immediately loading it
- Updated click handlers to reverse the flow: select file first (within
  user gesture), then check for unsaved changes, then load the file
- This maintains iOS Safari compatibility while keeping the polished UX
  with Bootstrap modals

The new flow is actually better UX: users can browse for files before
committing to discard changes.
@alexwarren alexwarren merged commit 014fa47 into textadventures:main Jan 12, 2026
5 checks passed
@alexwarren alexwarren deleted the claude/fix-open-file-ipad-93Qr2 branch January 12, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants