Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

[MDCDialog, MDCMenuSurface] Menu Surface does not properly anchor to TextField when in a dialog #5619

@bitantepd23

Description

@bitantepd23

Bug report

I am trying to use a menu surface to give suggestions via textfield in a dialog. It appears the menu surface's position is adjusting from the corner of the dialog surface rather than anchoring to the textfield.

Steps to reproduce

  1. Have a dialog with a textfield and datalist/menu surface
  2. Enter text in the textfield to bring up the menu surface

Actual behavior

Menu surface appears in the scrim, offset from the dialog surface

Expected behavior

Menu surface appears under the textfield

Screenshots

image

Your Environment:

Software Version(s)
MDC Web 3.2.0
Browser Chrome
Operating System MacOS Catalina 10.15.2

Additional context

I believe that the menu surface is calculating it's left and top offsets from the top-left corner of the dialog-container rather than the window, which is causing it to position itself to the right of the textfield and dialog-surface.

Possible solution

I think the menu surface's position could be correctly calculated if it were using the page behind the dialog surface/scrim to determine the position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions