Skip to content

fix: restore QDrawer swipe-to-open guard inverted in v2.20.0 (fix #18331)#18332

Closed
128na wants to merge 1 commit into
quasarframework:devfrom
128na:fix/qdrawer-onopenpan-guard
Closed

fix: restore QDrawer swipe-to-open guard inverted in v2.20.0 (fix #18331)#18332
128na wants to merge 1 commit into
quasarframework:devfrom
128na:fix/qdrawer-onopenpan-guard

Conversation

@128na

@128na 128na commented Jun 20, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch (or v[X] branch)
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on an Electron app
  • Any necessary documentation has been added or updated in the docs or explained in the PR's description.

Other information:

Fixes #18331

onOpenPan()'s early-return guard in QDrawer.js was inverted between v2.19.3 and v2.20.0, breaking the edge-swipe-to-open gesture whenever the drawer is closed (exactly the case it's meant to handle).

v2.19.3 (correct):

function onOpenPan(evt) {
  if (showing.value !== false) {
    // some browsers might capture and trigger this
    // even if Drawer has just been opened (but animation is still pending)
    return
  }
  ...

v2.20.0 / v2.20.1 / dev (broken, before this PR):

function onOpenPan(evt) {
  // some browsers might capture and trigger this
  // even if Drawer has just been opened (but animation is still pending)
  if (!showing.value) return
  ...

showing.value !== false (skip only when already showing) was changed to !showing.value (skip when not showing) — the exact logical opposite, so the swipe-to-open gesture became a no-op while the drawer was closed.

This PR reverts the guard back to the v2.19.3 behaviour, with no other functional change.

Reproduction

Live reproduction (broken on current quasar@2, confirmed fixed when pinned to 2.19.3): https://jsfiddle.net/ytma3qLn/

Steps:

  1. Open the reproduction link (a q-drawer forced into mobile/swipe mode via breakpoint="9999", starting closed).
  2. Drag with the mouse starting at the very left edge (x < 15px) towards the right.
  3. Without this fix: nothing happens. With this fix (or quasar@2.19.3): the drawer opens.

…asarframework#18331)

onOpenPan()'s early-return guard was changed from
"if (showing.value !== false) return" to "if (!showing.value) return"
between v2.19.3 and v2.20.0, inverting its meaning. This made the
edge-swipe-to-open gesture a no-op whenever the drawer was closed,
i.e. exactly the case it's meant to handle, breaking mobile swipe-open
entirely.
@rstoenescu

Copy link
Copy Markdown
Member

Ahhhh.. saw the PR after fixing it myself. Sorry :(
But thank you for the bug report and the PR!

@rstoenescu rstoenescu closed this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QDrawer: swipe-to-open gesture broken on mobile (onOpenPan guard condition inverted in v2.20.0)

2 participants