Skip to content

Commit

Permalink
fix: scroll-triggered popups on non-AMP pages
Browse files Browse the repository at this point in the history
When a page is non-AMP, the AMP component will not be treated as self-closing
  • Loading branch information
adekbadek committed Sep 30, 2020
1 parent 79b654a commit 6b55e13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-newspack-popups-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ function ( $evts ) use ( $popup, $body, $element_id ) {
</form>
</amp-layout>
<div id="page-position-marker" style="position: absolute; top: <?php echo esc_attr( $popup['options']['trigger_scroll_progress'] ); ?>%"></div>
<amp-position-observer target="page-position-marker" on="enter:showAnim.start;" once layout="nodisplay" />
<amp-position-observer target="page-position-marker" on="enter:showAnim.start;" once layout="nodisplay"></amp-position-observer>
<amp-animation id="showAnim" layout="nodisplay">
<script type="application/json">
{
Expand Down

0 comments on commit 6b55e13

Please sign in to comment.