Skip to content

fix(quick-tools): prevent scrollbars during editor gestures - #2777

Merged
bajrangCoder merged 1 commit into
mainfrom
fix/quick-tools-scrollbar
Aug 21, 2026
Merged

fix(quick-tools): prevent scrollbars during editor gestures#2777
bajrangCoder merged 1 commit into
mainfrom
fix/quick-tools-scrollbar

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

Closes: #2338

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces temporary CSS hit-test disabling with a short-lived capture-phase event guard, preventing older Android WebViews from repainting quick-tools scrollbars during editor gestures.

  • Adds a reusable editor interaction guard with a configurable clock and duration.
  • Applies the guard to quick-tools and notification interactions after editor pointer activity.
  • Removes the former data-editor-touched CSS rules.
  • Adds unit coverage for guarded, unrelated, expired, and non-cancelable events.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

The new guard preserves the prior temporary blocking behavior while avoiding CSS hit-test toggling, and the repository’s event wiring and module-resolution configuration support the changed implementation.

Important Files Changed

Filename Overview
src/handlers/editorWorkaround.js Replaces body-attribute toggling with capture-phase suppression of guarded controls during the editor interaction window.
src/lib/editorInteractionGuard.ts Introduces a small time-based guard that safely handles non-Element targets and non-cancelable events.
src/main.scss Removes the transient pointer-events rules that caused scrollbar repainting.
tests/unit/editorInteractionGuard.test.js Covers active and expired suppression, unrelated targets, and non-cancelable events.

Sequence Diagram

sequenceDiagram
  participant User
  participant EditorHandler
  participant Guard
  participant QuickTools
  User->>EditorHandler: pointerdown in editor
  EditorHandler->>Guard: markActive()
  User->>QuickTools: event within 200 ms
  QuickTools->>Guard: capture-phase suppress(event)
  Guard-->>QuickTools: prevent default and stop propagation
  Note over Guard,QuickTools: Events after expiry proceed normally
Loading

Reviews (1): Last reviewed commit: "fix(quick-tools): prevent scrollbars dur..." | Re-trigger Greptile

@bajrangCoder bajrangCoder added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Aug 20, 2026
@github-actions github-actions Bot removed the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Aug 20, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Preview Release for this, has been built.

Click here to view that github actions build

@bajrangCoder
bajrangCoder added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit f788005 Aug 21, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 21, 2026
@bajrangCoder
bajrangCoder deleted the fix/quick-tools-scrollbar branch August 21, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Weird effect on quick tools if I touch the editor

1 participant