Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: <datalist> dropdown positioning #36934

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jan 18, 2023

Description of Change

Closes #36906.
Refs #35628.

Fixes an issue where <datalist> elements were improperly positioned within the page. We had copied several helper functions out of chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc and were using CalculatePopupXAndWidthHorizontallyCentered after having called CalculatePopupBounds. CalculatePopupBounds itself calls CalculatePopupXAndWidthHorizontallyCentered, so there's no need to do it twice.

Tested with https://gist.github.com/e50cb256d567ed25b7bbf12b9cbe5417.

Before Screenshot 2023-01-18 at 11 37 44 AM
After Screenshot 2023-01-18 at 11 37 35 AM

Checklist

Release Notes

Notes: Fixed an issue where <datalist> elements were improperly positioned within the page.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/22-x-y PR should also be added to the "22-x-y" branch. target/23-x-y PR should also be added to the "23-x-y" branch. labels Jan 18, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 18, 2023
@codebytere codebytere marked this pull request as draft January 18, 2023 13:48
@codebytere codebytere marked this pull request as ready for review January 18, 2023 19:56
@codebytere codebytere removed the new-pr 🌱 PR opened in the last 24 hours label Jan 19, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 19, 2023
@codebytere codebytere merged commit 55c818d into main Jan 19, 2023
@codebytere codebytere deleted the fix-datalist-positioning branch January 19, 2023 18:44
@release-clerk
Copy link

release-clerk bot commented Jan 19, 2023

Release Notes Persisted

Fixed an issue where &lt;datalist&gt; elements were improperly positioned within the page.

@codebytere codebytere removed the new-pr 🌱 PR opened in the last 24 hours label Jan 19, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 19, 2023
@trop
Copy link
Contributor

trop bot commented Jan 19, 2023

I was unable to backport this PR to "22-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/22-x-y and removed target/22-x-y PR should also be added to the "22-x-y" branch. labels Jan 19, 2023
@trop
Copy link
Contributor

trop bot commented Jan 19, 2023

I have automatically backported this PR to "23-x-y", please check out #36959

@trop trop bot added in-flight/23-x-y and removed target/23-x-y PR should also be added to the "23-x-y" branch. labels Jan 19, 2023
@trop trop bot added merged/23-x-y PR was merged to the "23-x-y" branch. and removed in-flight/23-x-y labels Jan 20, 2023
@Antelope-IT
Copy link

Is this likely to be backported to 22.x.y or will we have to wait for the release of 23.x.y for a fix?

@zcbenz
Copy link
Member

zcbenz commented Jan 26, 2023

This PR needs a manual backport. It is marked as targeting 22.x.y but the bot could not do it automatically.

khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
fix: datalist dropdown positioning
gecko19 pushed a commit to brightsign/electron that referenced this pull request Feb 28, 2023
fix: datalist dropdown positioning
@1339240789
Copy link

Do not plan to port this fix to 22.x.y?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/23-x-y PR was merged to the "23-x-y" branch. new-pr 🌱 PR opened in the last 24 hours semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Datalist positioning is broken in Electron v22.x.y
5 participants