Repository navigation
Conversation
vditor's getEventName() returns "touchstart" for iPhone user agents, a workaround for the long-gone 300ms click delay. With it every toolbar action fires on finger-down, with no pressed feedback. The app ships a user-scalable=no viewport, so click fires with no delay; make vditor always use it. The latest vditor release (4.0.1) still has the touchstart branch, so the change is applied as a bun patchedDependencies patch against the pinned 3.11.2. Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vditor's
getEventName()returns"touchstart"for iPhone user agents, a workaround for the 300ms click delay. Blinko ships auser-scalable=noviewport, whereclickfires with no delay, so the branch only means that every toolbar action fires on finger-down, with no pressed feedback.Blinko pins
vditor@3.11.2and the latest release (4.0.1) still has the branch, so it is patched in place:// node_modules/vditor/src/ts/util/compatibility.ts export const getEventName = () => { - if (navigator.userAgent.indexOf("iPhone") > -1) { - return "touchstart"; - } else { - return "click"; - } + return "click"; };Evidence
iPhone user agent, editor open,
mainvs this branch (bun 1.2.8, clean install). Run once with each event:touchstartclicktruefalsefalsetruebun install --frozen-lockfilepasses with bun 1.2.8 (the Dockerfile and the release workflows) and with 1.3.10.bun.lockonly gains thepatchedDependenciesentry.Merge Danger
Door: two-way
Delete the
patchedDependenciesentry and the patch file.Blast Radius: Dependency
patchedDependenciesentry. It needs a bun that supports it; 1.2.8 does.click.vditor@3.11.2. A vditor bump that leaves the key behind installs vditor unpatched, and bun 1.2.8 does not warn about it.🤖 Generated with Claude Code