Skip to content

Commit

Permalink
Add hidden attribute to bento-lightbox and bento-sidebar to prevent F…
Browse files Browse the repository at this point in the history
…OUC (#37070)
  • Loading branch information
westonruter committed Dec 6, 2021
1 parent 80ca53e commit 32f415a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions extensions/amp-lightbox/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defineBentoLightbox();
></script>
</head>
<body>
<bento-lightbox id="my-lightbox">
<bento-lightbox id="my-lightbox" hidden>
Lightboxed content
<button id="close-button">Close lightbox</button>
</bento-lightbox>
Expand Down Expand Up @@ -198,7 +198,7 @@ When the `scrollable` attribute is present, the content of the lightbox can scro
></script>
</head>
<body>
<bento-lightbox id="my-lightbox">
<bento-lightbox id="my-lightbox" hidden>
Lightboxed content
<button id="close-button">Close lightbox</button>
</bento-lightbox>
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-lightbox/1.0/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</style>
</head>
<body>
<bento-lightbox id="my-lightbox">
<bento-lightbox id="my-lightbox" hidden>
<div class="lightbox-content">
<h1>Lightboxed content</h1>
<button id="close-button">Close lightbox</button>
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-sidebar/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defineBentoSidebar();
/>
</head>
<body>
<bento-sidebar id="sidebar1" side="right">
<bento-sidebar id="sidebar1" side="right" hidden>
<ul>
<li>Nav item 1</li>
<li>Nav item 2</li>
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-sidebar/1.0/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</svg>
</button>

<bento-sidebar id="sidebar1" side="left">
<bento-sidebar id="sidebar1" side="left" hidden>
<button id="close-sidebar">
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/e2e/bento/lightbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>
<button id="open-button">Open</button>
<button id="close-button">Close</button>
<bento-lightbox id="my-lightbox">
<bento-lightbox id="my-lightbox" hidden>
<p>Test</p>
<button slot="close-button">Close</button>
</bento-lightbox>
Expand Down

0 comments on commit 32f415a

Please sign in to comment.