-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMP shadows broken due AMP doc being activated on interaction #29608
Comments
cc/ @dvoytenko |
@oliverfernandez |
Got it! I'll send the PR ASAP. Thanks!! |
@dvoytenko PR ready! |
Thanks a lot! Merged! |
A side note: this issue was also seen on amp-next-page causing more unnecessary ad requests . fixed by the same PR. thank you @oliverfernandez |
This bug has been introduced when the issue #28227 has been fixed in the PR #28807
SInce now an AMP document is set to
visible
when the users interacts withwindow
, those websites that use AMP shadows does not have control over thevisibilityState
of theampdoc
since it automatically switches tovisible
I understand that this "visible on user interaction" behaviour is not necessary in AMP shadow mode.
The fix should be as easy as checking here
this.ampdoc.isSingleDoc() === true
before callingvisibleOnUserAction_()
method, and I was going to open a PR for it.However I just saw that it seems that the method
isSingleDoc
is being deprecated, and there's a newampdoc FIE
that I'm not familiar with, so I'm not sure which should be the right fix.The text was updated successfully, but these errors were encountered: