Skip to content

🐛 [Story outlink] Use linker on swipe up#33911

Merged
mszylkowski merged 1 commit intoampproject:mainfrom
mszylkowski:linker_pageattachment
Apr 20, 2021
Merged

🐛 [Story outlink] Use linker on swipe up#33911
mszylkowski merged 1 commit intoampproject:mainfrom
mszylkowski:linker_pageattachment

Conversation

@mszylkowski
Copy link
Copy Markdown
Contributor

@mszylkowski mszylkowski commented Apr 20, 2021

Closes #33860

Outlinks are clicked inside a shadow dom, so the linker doesn't get triggered.
Fix: Replace the .click() with triggerClickFromLightDom, a utility function that clones the anchor tag and adds it into the light dom, so that the linker can catch the navigation event and append the linker queryParam.

Tested on swipe up and click, both work with the linker.

@mszylkowski mszylkowski requested review from gmajoulet and raxsha April 20, 2021 15:23
@mszylkowski mszylkowski self-assigned this Apr 20, 2021
@amp-owners-bot
Copy link
Copy Markdown

Hey @gmajoulet, @newmuis, @Enriqe! These files were changed:

extensions/amp-story/1.0/amp-story-page-attachment.js

@mszylkowski mszylkowski requested review from Enriqe and removed request for raxsha April 20, 2021 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Amp Story outlink doesn't work with the linker since it's a click on a shadow dom

4 participants