Skip to content

Commit

Permalink
fix(api): Expand HD image from the first time on Firefox
Browse files Browse the repository at this point in the history
Closes #38
  • Loading branch information
francoischalifour committed Aug 25, 2018
1 parent 4ad9010 commit 264c81f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/medium-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const mediumZoom = (selector, options = {}) => {
// We need to access the natural size of the full HD
// target as fast as possible to compute the animation.
const getZoomTargetSize = setInterval(() => {
if (__TEST__ ? true : active.zoomedHd.naturalWidth) {
if (__TEST__ ? true : active.zoomedHd.complete) {
clearInterval(getZoomTargetSize)
active.zoomedHd.classList.add('medium-zoom-image--opened')
active.zoomedHd.addEventListener('click', close)
Expand Down

0 comments on commit 264c81f

Please sign in to comment.