Your Time:
Our Time:
← Back to discussions

Main menu/sub-menu problems on mobile devices

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 10 replies, 2 voices, and was last updated 6 years, 12 months ago by CatMissile.

  • 2019-08-15 at 12:13 am
    Unknown Support Status
    #25660
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    I discovered a couple of problems with the main menu when viewing our dev site on a tablet with iOS which make the site difficult to navigate and use:

    1. When touching on a menu item that has a sub-menu, only the small far right ‘down-arrow’ works. Tapping on the text itself doesn’t reveal the sub-menu, even though the text highlights. However, for the menu items that have no sub-menu (Sermons, Give, etc.), the text link does work. How do we ensure that all of the text in the menu works, and not just the tiny arrows on the right?

    2. When the main menu is activated on a tablet (when held vertically / in portrait mode), if the user attempts to scroll at all, no matter how minor, the menu disappears. This only happens on a tablet; on smart phones it appears to work fine.

    2019-08-16 at 11:53 am
    #25669
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    1) Go the directory path \wp-content\themes\hopes\js\sys_custom.js line No: 167 approximately and find the following code

    // Child Menu Toggle
    jQuery('.iva-children-indenter').click(function(){
    	$(this).parent().parent().toggleClass('iva-menu-open');
    	$(this).parent().parent().find('> ul').slideToggle();
    		
    	return false;
    });

    And replaced with this code

    // Child Menu Toggle
    jQuery('.menu-item-has-children').click(function(){
    	$(this).children('.sub-menu').slideToggle(500);
    });
    2019-08-16 at 8:55 pm
    Unknown Support Status
    #25670
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    Ok, that worked great to get the menu button text to work – Thanks!

    However, on a tablet the menu still abruptly disappears as soon as the user scrolls. On a phone it works just fine, and the menu scrolls with the rest of the page.

    For comparison, I looked at another theme that appears to have the same menu, and this one appears to work correctly: http://www.aivahthemes.com/preview/?theme=storeup

    • This reply was modified 7 years, 1 month ago by CatMissile.
    2019-08-21 at 3:51 pm
    #25684
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    @CatMissile Its working fine on my side. Can you please share your website so that we will take a closer look at it.

    2019-08-21 at 9:16 pm
    Unknown Support Status
    #25691
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    This is our dev site: http://wp5.temp.domains/~suburbt7/

    The menu disappears instantly on a tablet (iOS) on scroll when held vertically/portrait. If held horizontally, it seems to work fine i.e. the menu scrolls on the page. Works fine on a phone too.

    2019-08-28 at 7:25 pm
    #25729
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Can you please post us a screenshot of the devices in which you’re testing. From my end, it is working fine.

    2019-08-30 at 9:55 pm
    Unknown Support Status
    #25739
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    Here’s a short video that shows what I mean. You’ll see that the menu will not scroll when the iPad is held vertically – it instantly vanishes. It works fine when held horizontally, and also works fine on a iPhone/smart-phone.

    https://youtu.be/K-tjMqw4fDM

    2019-09-07 at 5:11 am
    Unknown Support Status
    #25802
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    Are there any updates yet on a solution to this? Hopefully my video (above) made sense. We are getting ready to go-live very soon and are anxious to get this resolved.

    2019-09-09 at 11:00 am
    #25806
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Hi, CatMissile
    We understand the menu problem we’re working on this and update you as soon as possible.

    2019-09-11 at 12:11 pm
    #25817
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Hi, CatMissile
    Go through the following directory path ../wp-content.themes/hopes/js/sys_custom.js
    Find the following code

    // On Window Resize
    function resizemobile(){
    	// show meun starting from iPad Portrait
    	if( window.innerWidth < 768 ){
    		jQuery('.header #menuwrap').hide();
    	}else {
    		jQuery('.header #menuwrap').show();
    		jQuery('.iva-mobile-menu').hide();
    	}
    }

    And replace with this

    function resizemobile(){
    	// show meun starting from iPad Portrait
    	if( window.innerWidth < 768 ){
    		$("#menuwrap").click(function(){
    		  $(".iva-mobile-menu").toggle();
    		});
    	}
    }

    If still find any issue let us inform.

    2019-09-18 at 9:04 pm
    Unknown Support Status
    #25876
    CatMissile
    Participant
    • Topics: 4
    • Replies: 13
    • Total posts: 17
    • Post count: 17

    Thanks for that new code.

    I updated the file and it “sort of” works. I checked it across five different iPads, all with identical screen resolutions, and it worked on two of them, but the problem persists on three of them.

    I checked it in Safari, Chrome, and Firefox, and the browser seemed to make no difference. In other words, if it worked in one browser, it worked on all three. Conversely, if it failed on one, it failed on all.

    Is it something specific to this piece of code, and would changing the ‘768’ affect the function?: if( window.innerWidth < 768 )

The topic ‘Main menu/sub-menu problems on mobile devices’ is closed to new replies.