Skip to content

Conversation

@jtydhr88
Copy link
Collaborator

@jtydhr88 jtydhr88 commented Dec 3, 2025

Summary

When the browser loses focus (e.g., switching apps, showing the dock), touchend events may not fire, causing touchCount to remain non-zero. This blocks all subsequent single-finger interactions since processMouseDown returns early when touchCount > 0.

Added visibilitychange and touchcancel event listeners to reset touch state when the page becomes hidden or touch is interrupted by the system.

fix #6721

┆Issue is synchronized with this Notion page by Unito

@jtydhr88 jtydhr88 requested a review from a team as a code owner December 3, 2025 17:53
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 3, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

Adds a touch-state reset helper and subscribes to document visibilitychange and canvas-parent touchcancel to reset touch-related state; also updates an import path in the simpleTouchSupport extension. Changes do not alter existing touchstart/move/end logic.

Changes

Cohort / File(s) Summary
Simple touch support update
src/extensions/core/simpleTouchSupport.ts
- Changed import path from relative to @/scripts/app.
- Added resetTouchState helper to clear touchCount, touchZooming, touchTime, lastTouch, lastScale, touchDist.
- Added document visibilitychange listener to call reset when document.hidden.
- Added touchcancel listener on the canvas parent element to call reset when touches are interrupted.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements required touch state reset mechanisms via visibilitychange and touchcancel listeners to address iPadOS focus loss issues preventing single-finger interactions.
Out of Scope Changes check ✅ Passed The PR contains only in-scope changes: import path modernization, resetTouchState helper, and event listeners for touch state recovery.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ipad-fix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5093faa and a9d30d8.

📒 Files selected for processing (1)
  • src/extensions/core/simpleTouchSupport.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/extensions/core/simpleTouchSupport.ts
🧠 Learnings (3)
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • src/extensions/core/simpleTouchSupport.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate

Applied to files:

  • src/extensions/core/simpleTouchSupport.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • src/extensions/core/simpleTouchSupport.ts
🧬 Code graph analysis (1)
src/extensions/core/simpleTouchSupport.ts (1)
src/scripts/app.ts (1)
  • app (1708-1708)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
  • GitHub Check: setup
🔇 Additional comments (3)
src/extensions/core/simpleTouchSupport.ts (3)

3-3: LGTM! Import path modernized.

The change from a relative import to the alias import @/scripts/app aligns with project conventions and improves maintainability.


85-92: Excellent! Extracted cleanup method as requested.

This helper function addresses the previous review feedback about extracting a method to ensure cleanup stays synchronized. It consistently resets all touch-related state variables (both module-level and function-scoped).


94-103: Core fix looks solid. Memory cleanup deferred per previous discussion.

The visibilitychange and touchcancel listeners effectively address the iPad Safari issue where touchend events are missed when focus is lost. The implementation correctly:

  • Resets state only when document.hidden is true
  • Uses the extracted resetTouchState helper for consistency
  • Attaches listeners to appropriate targets (document vs. canvas parent)

The previous reviewer noted that listener cleanup is a known concern but explicitly stated it's "not for this PR." Since this extension runs for the app's lifetime, the practical impact is minimal, though eventual cleanup would improve hygiene.

Based on past review comments, the cleanup concern is acknowledged but deferred.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/04/2025, 01:24:56 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/04/2025, 01:33:14 AM UTC

📈 Summary

  • Total Tests: 494
  • Passed: 480 ✅
  • Failed: 0
  • Flaky: 4 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 471 / ❌ 0 / ⚠️ 4 / ⏭️ 10
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — 🔴 +444 B
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +156 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🔴 +162 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
App Entry Points 🔴 +444 B (3.2 MB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.81 MB) · Graph Workspace ⚪ 0 B (972 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (169 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.2 MB (baseline 3.2 MB) • 🔴 +444 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-Bw_vHfWZ.js (removed) 2.97 MB 🟢 -2.97 MB 🟢 -619 kB 🟢 -470 kB
assets/index-LMD9qQ-h.js (new) 2.97 MB 🔴 +2.97 MB 🔴 +619 kB 🔴 +470 kB
assets/index-jbvlJ0Eu.js (new) 223 kB 🔴 +223 kB 🔴 +47.6 kB 🔴 +39.3 kB
assets/index-B1ynqKHS.js (removed) 223 kB 🟢 -223 kB 🟢 -47.5 kB 🟢 -39.2 kB
assets/index-D77T0fRj.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +209 B
assets/index-DSQZTaa4.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -209 B

Status: 3 added / 3 removed

Graph Workspace — 972 kB (baseline 972 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DGtaMOut.js (removed) 972 kB 🟢 -972 kB 🟢 -188 kB 🟢 -143 kB
assets/GraphView-kBR5rtI0.js (new) 972 kB 🔴 +972 kB 🔴 +188 kB 🔴 +143 kB

Status: 1 added / 1 removed

Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-v2yt1adf.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-yGqDRHoZ.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-CODZaChp.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/CreditsPanel-WvrJGX5Q.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/KeybindingPanel-B3ZRhww0.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/KeybindingPanel-DWNWPD6p.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-CVdcFnr2.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/ExtensionPanel-DP07PJEL.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.58 kB 🔴 +2.26 kB
assets/AboutPanel-Dyj_1eYe.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-VAzV-DzH.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-B3MmnPf1.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-CW9qtXnz.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-CWmhZg-d.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-D8HLpiZT.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 169 kB (baseline 169 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-DPCToOzc.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-IG4XrjxE.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.31 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-B6TA68t-.js (new) 47.6 kB 🔴 +47.6 kB 🔴 +10.3 kB 🔴 +8.9 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-C62fApCR.js (removed) 47.6 kB 🟢 -47.6 kB 🟢 -10.3 kB 🟢 -8.9 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-BKIKkcmS.js (removed) 39.4 kB 🟢 -39.4 kB 🟢 -9.09 kB 🟢 -7.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DSbR8F4G.js (new) 39.4 kB 🔴 +39.4 kB 🔴 +9.09 kB 🔴 +7.97 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-bnn2n8uc.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.96 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-QGOQXCFG.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.97 kB
assets/ComfyQueueButton-BDS2DGuq.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/ComfyQueueButton-CwJhX3im.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.47 kB 🟢 -2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-Cht2jhdZ.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -429 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CHWftXCb.js (new) 897 B 🔴 +897 B 🔴 +502 B 🔴 +435 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DRxvgpU7.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-DBkWxjh1.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-VhqMWCTd.js 2.16 kB 2.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-C6v8b-nD.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-hfNFEXn9.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-VqgtJapi.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +828 B
assets/audioService-YTUX2rgF.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -959 B 🟢 -825 B
assets/serverConfigStore-BIb40oOr.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BRCoAp6n.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +549 B
assets/audioUtils-BsOp-hFY.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -549 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-DWRkrNy1.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BZzgsWym.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-3gHexYD_.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-Dw558Ulu.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-CoO6TOrn.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-19UaOs90.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.62 kB
assets/WidgetRecordAudio-CQB8F5Z0.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.62 kB
assets/AudioPreviewPlayer-Bn3IQcBi.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.05 kB
assets/AudioPreviewPlayer-CuhSa0kd.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.04 kB
assets/WidgetGalleria-DdV2Jors.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetGalleria-DyUGfjfG.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetColorPicker-BjuamChM.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-Djn24fmt.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-C5YPt4mX.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetMarkdown-CWeQtF1O.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetAudioUI-BKe67W0_.js (removed) 2.82 kB 🟢 -2.82 kB 🟢 -1.12 kB 🟢 -1.02 kB
assets/WidgetAudioUI-C8CdlSWa.js (new) 2.82 kB 🔴 +2.82 kB 🔴 +1.12 kB 🔴 +1.02 kB
assets/WidgetTextarea-DaoNOghi.js (new) 2.79 kB 🔴 +2.79 kB 🔴 +1.1 kB 🔴 +986 B
assets/WidgetTextarea-Zr6-PmLs.js (removed) 2.79 kB 🟢 -2.79 kB 🟢 -1.09 kB 🟢 -999 B
assets/WidgetInputText-Bm9ymUbS.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +918 B 🔴 +854 B
assets/WidgetInputText-CHl7FDol.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -917 B 🟢 -847 B
assets/MediaImageBottom-B0-iUlba.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -740 B 🟢 -646 B
assets/MediaImageBottom-DqSC0TDp.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +744 B 🔴 +648 B
assets/MediaAudioBottom-nHCz75nv.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +742 B 🔴 +658 B
assets/MediaAudioBottom-ygv0NraS.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -740 B 🟢 -657 B
assets/MediaVideoBottom-9tFzz3t7.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +740 B 🔴 +656 B
assets/MediaVideoBottom-BsrTdofa.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -736 B 🟢 -656 B
assets/Media3DBottom-CgE4cI2h.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +733 B 🔴 +652 B
assets/Media3DBottom-Cxq-QRf2.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -653 B
assets/Media3DTop-B1YfpUR5.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -764 B 🟢 -652 B
assets/Media3DTop-DqDqL1aM.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +765 B 🔴 +650 B
assets/WidgetSelect-CShIuVxr.js (new) 655 B 🔴 +655 B 🔴 +344 B 🔴 +288 B
assets/WidgetSelect-CTwd2cb5.js (removed) 655 B 🟢 -655 B 🟢 -345 B 🟢 -289 B
assets/WidgetInputNumber-C_1p6v47.js (removed) 595 B 🟢 -595 B 🟢 -329 B 🟢 -276 B
assets/WidgetInputNumber-Cwh0Y9qf.js (new) 595 B 🔴 +595 B 🔴 +331 B 🔴 +277 B
assets/Load3D-BACuiDCO.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +225 B
assets/Load3D-Bn-wRgwu.js (removed) 424 B 🟢 -424 B 🟢 -262 B 🟢 -224 B
assets/WidgetLegacy-BDj3aE1n.js (removed) 364 B 🟢 -364 B 🟢 -235 B 🟢 -195 B
assets/WidgetLegacy-DfO8WJ4T.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +195 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B1JflQcI.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B2lyXe48.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B9XEQ-pc.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BErKFzc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bf7Tze-u.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BhGMcO4Q.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CPZUloNQ.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dva0z-T2.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-un0K9wDS.js 81.8 kB 81.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DX0t5RN3.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BN0aEMtg.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-BpvqEylZ.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-8e6QYQW0.js 283 kB 283 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-A_9dx4yn.js 304 kB 304 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BbD3HDi7.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BOJhIPft.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-C-Pw33mW.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ChLyG0UJ.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CUVPxA4l.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dx5Y4xrW.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JqO5mNmW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-DsbKXC7D.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-nVNi67CU.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-DkvdXJVp.js 1.58 kB 1.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 17 added / 17 removed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/extensions/core/simpleTouchSupport.ts (1)

85-107: Good fix; consider centralizing touch reset logic and a small robustness tweak

The new visibilitychange and touchcancel handlers correctly address the stuck touchCount/touchZooming problem and match the PR goal. To keep this maintainable and avoid the two blocks drifting if touch state evolves, you can DRY the reset into a local helper:

-    // Reset touch state when page loses visibility (e.g., switching apps on iPad)
-    // This prevents touchCount from getting stuck when touchend events are missed
-    document.addEventListener('visibilitychange', () => {
-      if (document.hidden) {
-        touchCount = 0
-        touchZooming = false
-        touchTime = null
-        lastTouch = null
-        lastScale = null
-        touchDist = null
-      }
-    })
-
-    // Also handle touchcancel which fires when touch is interrupted
-    app.canvasEl.parentElement?.addEventListener('touchcancel', () => {
-      touchCount = 0
-      touchZooming = false
-      touchTime = null
-      lastTouch = null
-      lastScale = null
-      touchDist = null
-    })
+    const resetTouchState = () => {
+      touchCount = 0
+      touchZooming = false
+      touchTime = null
+      lastTouch = null
+      lastScale = null
+      touchDist = null
+    }
+
+    // Reset touch state when page loses visibility (e.g., switching apps on iPad)
+    // This prevents touchCount from getting stuck when touchend events are missed
+    document.addEventListener('visibilitychange', () => {
+      if (document.hidden) {
+        resetTouchState()
+      }
+    })
+
+    // Also handle touchcancel which fires when touch is interrupted
+    app.canvasEl.parentElement?.addEventListener('touchcancel', resetTouchState)

If you want an extra bit of defensive robustness (in case any browser ever delivers a stray touchend after a manual reset), you could also clamp touchCount in the touchend handler:

// Line 58 replacement
touchCount = Math.max(0, touchCount - e.changedTouches.length)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9d5ce7 and 5093faa.

📒 Files selected for processing (1)
  • src/extensions/core/simpleTouchSupport.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/extensions/core/simpleTouchSupport.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/extensions/core/simpleTouchSupport.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/extensions/core/simpleTouchSupport.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect

Comment on lines 100 to 105
touchCount = 0
touchZooming = false
touchTime = null
lastTouch = null
lastScale = null
touchDist = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we require the same cleanup, can we extract a method to make sure they stay in sync?

Also, not for this PR, but we might want to find a way to make sure we're cleaning up all the listeners we're adding. It's been a source of memory leaks.

@jtydhr88 jtydhr88 requested a review from DrJKL December 4, 2025 01:23
@jtydhr88 jtydhr88 merged commit 8b5e43d into main Dec 4, 2025
27 checks passed
@jtydhr88 jtydhr88 deleted the ipad-fix branch December 4, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iPadOS 26.1 通过浏览器(Safari、Edge、Google .etc)访问ComfyUI,失去焦点后再返回,一些元素无法交互。

3 participants