Skip to content

Commit

Permalink
fixed jetpack js file with fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-o committed Oct 2, 2023
1 parent e62cccf commit 61fa66c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions assets/js/3rd/plugin-jetpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ $(document).on('loadedNewItems.vpf', function (event) {
});

// Fix masonry reloading when Jetpack images lazy loaded.
// https://github.com/Automattic/jetpack/issues/9595
//
// p.s. it looks like this fix is not working at all in Safari browser.
const runReLayout = debounce(200, ($gallery) => {
$gallery.vpf('imagesLoaded');
});
Expand Down
2 changes: 1 addition & 1 deletion classes/3rd/plugins/class-jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function wp_enqueue_scripts() {
return;
}

Visual_Portfolio_Assets::register_script( 'visual-portfolio-3rd-jetpack', 'assets/js/3rd/plugin-jetpack.min', array( 'jquery' ) );
Visual_Portfolio_Assets::register_script( 'visual-portfolio-3rd-jetpack', 'build/assets/js/3rd/plugin-jetpack', array( 'jquery' ) );

$wp_scripts->registered[ $jetpack_ll_handler ]->deps[] = 'visual-portfolio-3rd-jetpack';
}
Expand Down

0 comments on commit 61fa66c

Please sign in to comment.