Fix copy button on Mobile Safari, simplify implementation#171
Conversation
Remove touchstart handler that was intercepting button taps and calling synthetic click(), which broke the user gesture chain required by Mobile Safari for clipboard access. Simplify copy button to match text-indentation.html pattern. https://tools.simonwillison.net/claude-code-timeline?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsimonw%2F86d8fcbad4f70661616db0d783e1c43e%2Fraw%2Fd2edbbeb3484169aa769e9eb984e99dbc9760c15%2Findex.jsonl#tz=local&q=&type=all&ct=all&role=all&hide=0&truncate=1&sel=81 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @simonw's task —— View job Code Review AnalysisReviewing PR #171: Fix copy button on Mobile Safari, simplify implementation Todo List
✅ Code Review SummaryThis PR successfully addresses a critical Mobile Safari clipboard access issue by removing problematic touchstart handlers and simplifying the copy functionality. Overall, this is a well-executed fix that improves both functionality and code maintainability. 📋 Detailed AnalysisCode Quality & Best Practices ⭐ Excellent
Bug Fixes ✅ Addresses Core Issue
Performance Considerations ✅ Improved
Security Assessment ✅ No Concerns
Minor Observations
Test Coverage RecommendationsWhile no automated tests exist for this functionality, consider manual testing:
🎯 VerdictApproved - This is a focused, well-implemented fix that addresses the specific Mobile Safari issue while significantly simplifying the codebase. The changes follow established patterns and improve both functionality and maintainability. |
|
Clicking "Copy HTML" on the https://tools.simonwillison.net/render-markdown on iOS was failing with an error, turns out the culprit was this: Lines 594 to 600 in de78b50 |
Remove touchstart handler that was intercepting button taps and calling synthetic click(), which broke the user gesture chain required by Mobile Safari for clipboard access.
Simplify copy button to match text-indentation.html pattern.
https://tools.simonwillison.net/claude-code-timeline?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsimonw%2F86d8fcbad4f70661616db0d783e1c43e%2Fraw%2Fd2edbbeb3484169aa769e9eb984e99dbc9760c15%2Findex.jsonl#tz=local&q=&type=all&ct=all&role=all&hide=0&truncate=1&sel=81
🤖 Generated with Claude Code
Full prompt sequence: