Giter VIP home page Giter VIP logo

Comments (4)

acdvorak avatar acdvorak commented on June 8, 2024 1

This issue only seems to happen the first time the menu is opened on the initial load of the Catalog page.

The second time the menu is opened, it is positioned correctly. Reloading the page also causes the menu to be positioned properly on first open.

The only way to repro the misalignment is to open a new browser tab, navigate to the Catalog page, and interact with an Enhanced Select:

screen video capture

AFAICT, this issue is not present on any of our screenshot test pages.

It might be a bug in the Catalog site (something something caching?).

from material-components-web-catalog.

cintaccs avatar cintaccs commented on June 8, 2024

could it be the body scroll bars that in some cases are adding to the "left" and in some cases not (like in your test case pages)...

from material-components-web-catalog.

moog16 avatar moog16 commented on June 8, 2024

I'm actually not able to reproduce this issue in an isolated setting, or in the screenshot tests. I think its just our catalog pages. I'm going to transfer this issue to the catalog.

This is what I used to try to reproduce:

<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">

  <body>
    <div class="mdc-select" id='select'>
      <input type="hidden" name="enhanced-select">
      <i class="mdc-select__dropdown-icon"></i>
      <div class="mdc-select__selected-text"></div>
      <div class="mdc-select__menu mdc-menu mdc-menu-surface">
        <ul class="mdc-list">
          <li class="mdc-list-item mdc-list-item--selected" data-value="" aria-selected="true"></li>
          <li class="mdc-list-item" data-value="grains">
            Bread, Cereal, Rice, and Pasta
          </li>
          <li class="mdc-list-item" data-value="vegetables">
            Vegetables
          </li>
          <li class="mdc-list-item" data-value="fruit">
            Fruit
          </li>
        </ul>
      </div>
      <span class="mdc-floating-label">Pick a Food Group</span>
      <div class="mdc-line-ripple"></div>
    </div>
    <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>

    <script>
      mdc.select.MDCSelect.attachTo(document.getElementById('select'));
    </script>
  </body>
</html>

from material-components-web-catalog.

bonniezhou avatar bonniezhou commented on June 8, 2024

Fixed!

from material-components-web-catalog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.