ampproject / ampproject/amphtml
amp-mega-menu occasionally fails to render
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
The amp-mega-menu parent header tag's class sometimes erroneously does not get the "i-amphtml-mega-menu-mask-parent" class. This may be a race condition.
I have been able to increase the rate of failure by using "display: flex", but it does not appear to be specifically related to that CSS property.
No workaround appears to exist.
## How do we reproduce the issue?
A min-reproducible test case is available on jsbin: https://jsbin.com/ripahibuza/edit?html,output
Refresh multiple times to see two different rendered outcomes:
Observed, expected:

Observed, erroneous:

## What browsers are affected?
This min-reproducible has been tested against the latest Chrome 86 on Windows 10. The issue has been observed in other environments as well.
## Which AMP version is affected?
This does not appear to be a regression. It may make sense to review #27454 when resolving this issue.
Contributor guide
Assessment
This issue has not been assessed yet.