8000 Fix touch targeting for panel resize handles by MUFFANUJ · Pull Request #866 · jupyterlab/lumino · GitHub
[go: up one dir, main page]

Skip to content
8000

Fix touch targeting for panel resize handles - #866

Open
MUFFANUJ wants to merge 1 commit into
jupyterlab:mainfrom
MUFFANUJ:touchResize
Open

MUFFANUJ wants to merge 1 commit into
jupyterlab:mainfrom
MUFFANUJ:touchResize

Conversation

@MUFFANUJ
Copy link
Copy Markdown
Member

Fixes jupyterlab/jupyterlab#16061

Lumino #835 added touch-action: none to prevent browsers from taking over resize gestures, but JupyterLab #16061 remained reproducible after the Lumino update in #20010. Testing Launchers, notebooks, and Lumino’s dock-panel example showed that Chromium can target neighboring interactive content instead of the divider, preventing resizing from starting. Registering a click listener on the default dock and split handles makes them recognizable touch targets while preserving the existing CSS and pointer-based resizing.

Adds native browser-touch regression coverage to the existing Playwright example suite, checking both panel types, both orientations, and content scrolling afterward.

@MUFFANUJ MUFFANUJ added the bug Something isn't working label Oct 29, 2026
@MUFFANUJ
Copy link
Copy Markdown
Member Author

Visuals

Screen.Recording.2026-10-29.at.8.45.40.PM.mov

@BryanOnKeys BryanOnKeys left a comment
8000 Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed 273f1fc79772ea88559146bb337a5f21b2430893 with AI assistance.

One finding in examples/example-dockpanel-iife/test/touch-resize.spec.ts: loadWidgets() always injects pkg.main. For @lumino/coreutils, that is dist/index.node.js, whose CommonJS require() throws in the browser. The package already declares browser: "dist/index.js".

I independently ran all four new native-CDP touch cases: they pass despite that uncaught require is not defined error. Adding a temporary pageerror assertion makes all four fail. In a temporary test copy, selecting the string browser entry with a main fallback, plus the same error assertion, passes all four with no page errors.

Could IPackage include the optional browser entry, and the loader select it before addScriptTag? Checking pageerror would also prevent a dependency script failing silently in these regressions.

The production change has useful failing-before coverage: temporarily removing just the two added click listeners from the built widgets bundle makes both horizontal resize cases fail; both vertical cases still pass. The original bundle was restored byte-for-byte and tracked files are unchanged. yarn build:src passed.

Environment: Linux, Node 24.22.1, Playwright 1.61.0 with local Chromium 153.0.8010.0, one fresh browser per case. The bundled Chrome download was unavailable here. I did not verify a physical Windows touch device or run the full widgets suite.

This branch has not been deployed

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to resize Launchers on touch screens

2 participants

0