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

fix(saber-plugin-image): remove blendIn class when image is loaded #390

Merged
merged 4 commits into from
Aug 29, 2019
Merged

fix(saber-plugin-image): remove blendIn class when image is loaded #390

merged 4 commits into from
Aug 29, 2019

Conversation

egoist
Copy link
Collaborator

@egoist egoist commented Aug 28, 2019

Summary

The blendIn class makes medium-zoom stop working

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI/CSS related code, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

@netlify
Copy link

netlify bot commented Aug 28, 2019

Deploy preview for saber ready!

Built with commit 980d3e4

https://deploy-preview-390--saber.netlify.com

@kidonng
Copy link
Contributor

kidonng commented Aug 28, 2019

LOL when I refactored the plugin I extracted the inline styles to stylesheet to prevent things like this but it seems medium-zoom is too stingy to use inline transition style 🤔

@kidonng
Copy link
Contributor

kidonng commented Aug 28, 2019

This is just a temporary fix, if one zooms the image before load complete the bug still appears. We need francoischalifour/medium-zoom#110 to get addressed.

I guess I will make a PR to them to inline their transition style.

@egoist egoist merged commit 72ccc7d into saberland:master Aug 29, 2019
@egoist egoist deleted the fix/saber-plugin-image branch August 29, 2019 09:01
loaded: el => {
el.addEventListener('load', () => {
el.setAttribute('data-lazy-loaded', '')
this.removeBlendIn = setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I didn't look at your code. Guess listening to transitionend is better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah sure, I just went with the easiest way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants