Skip to content
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

Remove the flash on story pages transitions. #13070

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

gmajoulet
Copy link
Contributor

Removes the flash on story pages transitions.

From this, to this.

There's another known hack to get rid of this overlay, but it'd break tap feedback on all the elements, including links or forms if we ever support it.


// Remove the cursor: pointer; style set by the runtime, to avoid wrong
// touch feedback on mobile, like a flashing overlay on page transitions.
resetStyles(this.win.document.documentElement, ['cursor']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be sufficient to do this in the "standalone" case (where amp-story is the only tag in the document), where we add the CSS class .i-amphtml-story-standalone to the document element anyway. So, maybe in the CSS we can just add:

.i-amphtml-story-standalone {
  cursor: default !important;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

@gmajoulet gmajoulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL


// Remove the cursor: pointer; style set by the runtime, to avoid wrong
// touch feedback on mobile, like a flashing overlay on page transitions.
resetStyles(this.win.document.documentElement, ['cursor']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dreamofabear dreamofabear merged commit 805be2e into ampproject:master Feb 1, 2018
RanAbram pushed a commit to RanAbram/amphtml that referenced this pull request Mar 12, 2018
* Remove the flash on story page transitions.

* Removing the iOS cursor: pointer on standalone stories only.
protonate pushed a commit to protonate/amphtml that referenced this pull request Mar 15, 2018
* Remove the flash on story page transitions.

* Removing the iOS cursor: pointer on standalone stories only.
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.

None yet

5 participants