Skip to content

The whitespace context menu logs a querySelector error on phones #4394

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

In 7.2.4 the whitespace context menu opens cleanly on phones; on main every open logs SyntaxError 'querySelector … The provided selector is empty', while the menu still works.

Pixel 7 only, console only. The throw skips the explicit drawer focus (focus trap still works).

Regression compared with OpenCloud 7.2.4 (web 7.1.5), found in the regression test before the release. Introduced by PR #3392 / 674c72c.

Cause: packages/design-system/src/components/OcDrop/OcMobileDrop.vue:199-201 registers getAnchor: () => document.querySelector(toggle) without a guard; WhitespaceContextMenu.vue is a manual drop without toggle. OcDrop.vue:194-198 has the guard.

Possible fix: getAnchor: () => (toggle ? document.querySelector(toggle) : null)

Reproduction Steps

  1. Log in on a phone (Pixel 7 portrait) and open any folder.
  2. Long-press or right-click the empty area below the file list.

Expected Outcome

The drawer opens without console errors.

Actual Outcome

It opens and works, but logs SyntaxError: Failed to execute 'querySelector' on 'Document': The provided selector is empty. on every open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions