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

[MDCSelect] Wrong position of opened Select inside Dialog component with option fixed + anchorCorner #6034

Closed
BePo65 opened this issue Jun 5, 2020 · 1 comment
Labels

Comments

@BePo65
Copy link

BePo65 commented Jun 5, 2020

Bug report

When using a MDCSelect with anchorCorner='bottomStart' and fixed=true inside of a MDCDialog, then the selection list (MDCMenu) is positioned too far to the right.
MDCSelect_in_MDCDialog

Reason why: MDCMenu has 'position:fixed' (in .mdc-menu-surface--fixed) and mdc-dialog-container has 'transform:scale(1)' (in .mdc-dialog--open .mdc-dialog__container). Therefore mdc-dialog-container creates a stacking context and will act as a containing block for the MDCMenu (instead of the browser window).

Steps to reproduce

  1. Create dialog with MDCSelect inside
  2. Open dialog
  3. Click icon of select to open selection list
  4. list is positioned too far to the right

Actual behavior

Left position of menu is calculated based on browser viewport (in MDCMenuSurfaceFoundation.prototype.adjustPositionForHoistedElement_).

Expected behavior

Left position of menu should be calculated based on stacking context.

Your Environment:

Software Version(s)
MDC Web 5.1.0
Browser FF 77.0 and Chrome 83.0
Operating System Windows 10 1909

Additional context

In issue #5590 a hack is proposed (set 'transform:none' in MDCMenu style (but this is only a hack with sideeffects unknown to me).

In issue #2399 the 'solution' was a rework for MDCSelect.

@BePo65 BePo65 added the bug label Jun 5, 2020
@allan-chen
Copy link
Collaborator

This should be fixed by #6012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants