Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 1, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Elvis Saravia and others added 2 commits November 1, 2025 10:12
Implemented a cross-platform clipboard solution with fallback mechanism to resolve mobile browser compatibility issues.

Changes:
- Added copyToClipboard() helper function that tries modern Clipboard API first
- Falls back to document.execCommand('copy') for mobile browsers with user agent restrictions
- Updated handleCopyAsMarkdown() and handleCopyFromModal() to use new helper
- Fixes "user agent or platform" permission errors on iOS Safari and mobile Chrome

The fallback method uses an invisible textarea element positioned off-screen,
which is the standard approach for mobile clipboard compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced the copyToClipboard function with better mobile browser compatibility:
- Position textarea in viewport (0,0) instead of off-screen for mobile compatibility
- Remove readonly attribute which prevents selection on mobile browsers
- Add 100ms delay before execCommand to allow mobile selection to process
- Implement iOS-specific selection handling using Range API
- Set minimum 16px font size to prevent iOS zoom
- Make textarea invisible using opacity and 1px dimensions
- Add proper cleanup with delayed element removal

Tested successfully on mobile browsers over local network.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Nov 1, 2025
@pull pull bot added the ⤵️ pull label Nov 1, 2025
@pull pull bot merged commit a6319d7 into Tiamat-Tech:main Nov 1, 2025
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants