Site logo

Archived topic

Possible conflict with Visual Composer

30 replies · Started by Peter Islin Nielsen on September 29, 2015

Viewing posts 16–30 of 31

Yep, I've just sent you the login credentials. Knock yourself out :-)

This is definitely a head scratcher.. I may have something to do with us using the :active or :focus CSS selectors, but if that's the case, that's something VC would have to look into, as those are just default CSS selectors and they work when not in the VC rows.

Another possible solution is to do something like this:

<script>
	var device = navigator.userAgent.toLowerCase();
	var ios = device.match(/(iphone|ipod|ipad)/);
	if ( ios ) {
		$('.vc_row a')
		.live('touchstart', function(){
			isScrolling = false;
		})
		.live('touchmove', function(e){
			isScrolling = true;
		})
		.live('touchend', function(e){
			if( !isScrolling )
			{
				window.location = $(this).attr('href');
			}
		});
	}	
</script>

Yeah, it's super weird. I've tried with your suggested code, but it doesn't help. But I think I've found something: After debugging like hell, I've narrowed (part of) the issue down to this little code snippet:

/**
 * Display the classes for the sidebar.
 *
 * @since 0.1
 * @param string|array $class One or more classes to add to the class list.
 */
function generate_right_sidebar_class( $class = '' ) {
	// Separates classes with a single space, collates classes for post DIV
	echo 'class="' . join( ' ', generate_get_right_sidebar_class( $class ) ) . '"';
}

I don't know why, but if I remove this code from generatepress/inc/element-classes.php the issue seems to go away on some pages. Of course this not a useful solution because it provokes other errors, but maybe it can give you a hint in what direction to look. I don't think it's related to the sidebar – but it might be related to the way classes are handled.

Interesting - so what happens if you set the page to have no sidebars?

Super weird - this means it's probably not that function.

I'll keep looking into it :)

Hi Tom,

Found anything yet? :-)

Every time I think I get close it doesn't end up being the issue.

Will dedicate a couple hours tomorrow and get it figured out - will update you.

Thanks, Tom! I really appreciate it.

As far as I can tell, it's an issue with the :hover selector in CSS. If you search for "ios :hover double tap" you'll find a lot of people talking about it.

Why is it an issue only in VC? I have no idea..

I can't fully test this (by removing the :hover selectors) as the admin account you made for me can't access files.

Is the homepage of your dev site using VC? I'm not noticing the issue on that page with my iPad.

Yes, it is. Sometimes the issue disappears if there's no sidebars on the page.

I'll happily set up an FTP account for you if it can help in any way?

Done :-)

Hi Tom.

Just to let you know, this issue has somehow fixed itself. I don't know how or when, but it was probably in one of the recent updates from WPBakery – maybe the one fixing their jQuery fuckup :-)

Thanks for all your help!

This archived topic is closed to new replies.