Skip to content

Prevent resize handles overlapping panel scrollbars - #1692

Merged
maxelkins merged 2 commits into
mainfrom
fix/1902-drag-handle-touch-area
Oct 16, 2026
Merged

maxelkins merged 2 commits into
mainfrom
fix/1902-drag-handle-touch-area

Conversation

@maxelkins

@maxelkins maxelkins commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • reduce the shared vertical and horizontal resize targets from 44px to 16px
  • make the gaps between resizable panels match the 16px target size
  • offset resize targets by 4px away from the resized panel's content
  • render the visible 4px grip with CSS and keep it centred within the panel gap
  • cover the sidebar, side-by-side editor, and stacked editor handles in the resize end-to-end tests

Why

The previous 44px targets extended well beyond the gaps between panels. On the instructions panel, the resize target overlapped the native scrollbar and intercepted pointer input, which made the scrollbar difficult or impossible to drag.

A 24px target would meet WCAG 2.2 success criterion 2.5.8, Target Size (Minimum), directly, but it creates an unnecessarily large gap in this layout. The same criterion also permits an undersized target through its spacing exception. For a 16px target, the imaginary 24px assessment circle extends 4px beyond each side of the target.

This change therefore moves the 16px target 4px away from the resized panel. The assessment circle reaches the panel boundary without overlapping its scrollbar. The target extends 4px into the non-interactive edge of the neighbouring panel, while the visible grip remains centred in the 16px gap.

The visible grip is now drawn with CSS rather than an SVG. This makes its position explicit relative to the interaction target and avoids SVG sizing affecting its visual alignment.

Because ResizableWithHandle is shared, the same sizing and positioning now applies to all resize handles rather than fixing only the instructions sidebar.

Screenshot.2026-10-16.at.13.06.54.mp4

Fixes RaspberryPiFoundation/digital-editor-issues#1902

Reduce resize targets to fit the 16px panel gaps and offset them away from resized panel content. This prevents the shared vertical and horizontal handles from intercepting scrollbar input while retaining WCAG 2.2 target spacing.
@zetter-rpf

Copy link
Copy Markdown
Contributor
Screenshot 2026-10-16 at 13 27 57

The handle looks very slightly off center to me - maybe it needs to move 1px to the right?

@zetter-rpf zetter-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one, just small thing to center the handle

@maxelkins

Copy link
Copy Markdown
Contributor Author

@zetter-rpf Yeah agree, will sort that, you reviewed it too quickly! haha

Replace the SVG grip artwork with CSS so its position can be aligned precisely within the panel gap while preserving the existing colour and dimensions.
@maxelkins
maxelkins merged commit 4fdf699 into main Oct 16, 2026
12 checks passed
@maxelkins
maxelkins deleted the fix/1902-drag-handle-touch-area branch October 16, 2026 14:07

This branch was successfully deployed

1 active deployment
previews/1692/merge — 14977027 Deployed Oct 16, 2026 by maxelkins via deploy-branch / build-deploy #6923
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.

2 participants