Skip to content

Commit 68ad07a

Browse files
Merge pull request #2118 from rtCamp/fix/gallery-shortcode-issues
Fix Gallery Shortcode reloading when comment is added on media. [develop]
2 parents 4a21976 + c197de9 commit 68ad07a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/assets/js/rtMedia.backbone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,8 +1898,9 @@ jQuery( document ).ready( function( $ ) {
18981898
/** Scroll function called */
18991899
rtMediaScrollComments();
19001900

1901+
const hasGalleryShortCodeTitle = !!$('.rtm-gallery-shortcode-title-container', 'body').length;
19011902
/** refreshing fragments */
1902-
if ( false == $( 'body' ).hasClass( 'activity' ) && false == $( 'body' ).hasClass( 'groups' ) ) {
1903+
if ( false == $( 'body' ).hasClass( 'activity' ) && false == $( 'body' ).hasClass( 'groups' ) && !hasGalleryShortCodeTitle ) {
19031904
galleryObj.reloadView();
19041905
}
19051906
},

0 commit comments

Comments
 (0)