Skip to content

[ticket/17648] Keep avatar cropper within its box for large size limits#6994

Open
ECYaz wants to merge 1 commit into
phpbb:masterfrom
ECYaz:ticket/17648
Open

[ticket/17648] Keep avatar cropper within its box for large size limits#6994
ECYaz wants to merge 1 commit into
phpbb:masterfrom
ECYaz:ticket/17648

Conversation

@ECYaz

@ECYaz ECYaz commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Checklist:

  • Correct branch: master for 4.x fixes
  • Tests pass
  • Code follows coding guidelines
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17648

The avatar cropper container is forced to twice the maximum allowed avatar size. With larger limits this exceeds the avatar box: in the UCP the box is capped at 400px height with visible overflow, so any limit above 200px pushes the cropper out of the box and it overlays the delete checkbox and the avatar type selection below. On narrow layouts the forced width has the same effect sideways — in the ACP at smaller window sizes a 250px limit forces a 500px wide cropper into a 278px wide box, spilling over the adjacent content. This is what makes the problem appear from around 150px limits on smaller screens.

Capping the doubled workspace at the box's own width and computed maximum height keeps the cropper inside the box in every case while leaving the stylesheet as the single source of truth — the ACP box has no height cap and keeps its natural growth. Verified on a live board: with a 250px limit the cropper now fills the box exactly with no overflow in UCP and ACP, and an upload still saves the avatar at the full 250px dimensions, since crop coordinates map to image pixels rather than container pixels. With the default 120px limit the computed minimums are unchanged from before and the cropper renders identically.

The cropper container is forced to twice the maximum allowed avatar
size. With large limits this exceeds the avatar box, which is capped
at 400px height in the UCP, so the cropper overlays the form fields
below it, and on narrow layouts the forced width makes it overflow
sideways over adjacent content. Cap the workspace at the box's own
width and maximum height so it can never leave the box.

PHPBB-17648
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.

1 participant