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-pan-zoom] Fix bug where zoom breaks after toggling display #17451
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is pauseCallback
called when style="display: none"
is toggled?
@cvializ yes it is. But strangely only the first time it's toggled. |
Weird, I wonder if that behavior is supposed to happen according to the Lines 1172 to 1179 in 43be5f5
|
Yes, it's expected. |
I can look into this a bit more. @jridgewell so it seems like if toggling |
It's not a bug. When a component becomes hidden, |
Oh okay. Cool. Yes, that matches the behavior that I'm observing, so I think all's good. |
Is this behavior documented anywhere currently? That jsdoc comment should be updated to fully describe the lifecycle |
…roject#17451) * Add manual test * Fix display none toggle bug
Fixes #17406. The resetContentDimensions in pauseCallback was originally made to reset after swiping between images in lightbox since carousel would call pauseCallback. Not applicable for current use case, though we may want to tweak it once we refactor
image-viewer
to use this.