Skip to content

fix: Fix positioning of dropdown/widgetdivs in a bordered injection div - #10509

Open
gonfunko wants to merge 1 commit into
mainfrom
chaff-positioning
Open

gonfunko wants to merge 1 commit into
mainfrom
chaff-positioning

Conversation

@gonfunko

Copy link
Copy Markdown
Contributor

The basics

The details

Proposed Changes

This PR fixes a bug where the DropDownDiv and WidgetDiv would be misaligned when the injection div (or whatever element common.setParentContainer() was called with) has a border. This surfaced in Scratch, which has a 1px border on the injection div, which caused field editors to be slightly offset from the field. This is trivially reproducible in core by setting e.g. a 20px border on the injection div in the playground and clicking an editable field or opening a dropdown or contextual menu. This change was LLM-assisted because CSS is cursed; I reviewed the implementation. jsdom also had a bug that defaulted elements to 16px border which was fixed in the latest version, so I bumped that as well to avoid errant test failures.

Reason for Changes

Things should appear in the correct place.

@gonfunko
gonfunko requested a review from a team as a code owner September 18, 2026 21:02
@gonfunko
gonfunko requested a review from mikeharv September 18, 2026 21:02
@github-actions github-actions Bot added the PR: fix Fixes a bug label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants