Comments (4)
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:
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.
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.
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.
Fixed!
from material-components-web-catalog.
Related Issues (20)
- Top app bar disappears when scrolled and navigating home
- Update catalog for 1.0.0
- Catalog iFrame IE11 performance HOT 1
- Replace history.push with replaceState
- SelectOption should dynamically switch between native and enhanced
- Analytics: Filter label changes
- mdc-top-app-bar__action-item--unbounded class should be denyListed
- Button has undefined class on demo page HOT 1
- [UI/UX] Disable Text Field
- Radio button not checked
- Update catalog for MDC Data Table
- Update Full Width Text Field Demos HOT 2
- MDCAnimations More Examples HOT 1
- [Docu Theme Dialog] component/theme/Dialog CSS missing padding
- [Checkbox] Theme flashes the secondary color after click HOT 2
- Full width text field not alligned with spec
- [Chips] Choice chips not working HOT 1
- Card variants should not include catalog-specific classes
- Style ExposedDropdownMenu is bad performance of Smooth HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-components-web-catalog.