Plugin Author
edo888
(@edo888)
Hi,
Try to disable smoothscroll plugin and check again. It seems to be a conflict between click event listeners. Flags click event is not getting executed for some reason.
Thanks! 🙂
Hi,
I disabled the functionality but the translation is not working yet.
What else can be the problem?
Thanks 😀
Plugin Author
edo888
(@edo888)
Hi,
The problematic code is located in wp-content/themes/jupiter/assets/js/core-scripts.6.4.0.js, it prevents the click event (preventDefault) to bubble down and reach the flag, so flag is never being clicked actually.
/**
* Assign global click handlers
*/
$( document ).on( 'click', '.js-smooth-scroll, .js-main-nav a', smoothScrollToAnchor);
$( '.side_dashboard_menu a' ).on( 'click', smoothScrollToAnchor);
function smoothScrollToAnchor( evt ) {
var anchor = MK.utils.detectAnchor( this );
var $this = $(evt.currentTarget);
var loc = window.location;
var currentPage = loc.origin + loc.pathname;
var href = $this.attr( 'href' );
var linkSplit = (href) ? href.split( '#' ) : '';
var hrefPage = linkSplit[0] ? linkSplit[0] : '';
var hrefHash = linkSplit[1] ? linkSplit[1] : '';
if( anchor.length ) {
if(hrefPage === currentPage || hrefPage === '') evt.preventDefault();
MK.utils.scrollToAnchor( anchor );
} else if( $this.attr( 'href' ) === '#' ) {
evt.preventDefault();
}
}
Thanks! 🙂