Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #412786

    Hi,
    Having searched the forum on the topic of tab behaviour on mobile, I realize you are familiar with the issue I am having.

    On my mobile phone, when I tap on a tab heading, the content jumps to a seemingly “random” position instead of the top of the chosen tab.

    I know it’s not actually random, but affected by the content of the other tabs, etc, however the point is that it does not go to the the desirable position, which would be the top of the chosen tab.

    I read that this issue was in the pipeline to be fixed in a future update. Is this on the horizon?

    In the meantime, can you suggest a fix I might be able to implement?

    Thanks

    #413427

    Hey wcathro!

    Thank you for using Enfold.

    The tab should scroll up if the tab title is not in viewport. Please provide a link to the page with the issue. Make sure that you’re running Enfold 3.1 on WordPress 4.1.1.

    Best regards,
    Ismael

    #414147
    This reply has been marked as private.
    #415057

    Hi!

    It is working fine on our installation. Please edit shortcode.js, find this code on line 2623:

    if(win.scrollTop() > el_offset)
    				{
    					$('html:not(:animated),body:not(:animated)').scrollTop(scoll_target);
    				}

    Replace it with:

    if(win.scrollTop() > el_offset)
    				{
    					$('html:not(:animated),body:not(:animated)').animate({scrollTop: scoll_target},200);
    				}
    

    Remove browser cache then reload the page.

    Regards,
    Ismael

    #415069

    Hi Ismael,

    Thanks for this, however it’s still not working for me. In my shortcodes.js file, this code was at line 2652. I made the edit as you recommended but the tabs are still not going to the right position on my phone.

    Earlier you mentioned a typo. Should “scoll_target” be “scroll_target”?

    Thanks,
    Warren

    #415080

    Not sure if this will help with the troubleshooting – I was having the same issue with accordions. But with the accordions I could set the option to allow them to stay open when another one is tapped, so there was no scrolling. While not the most ideal solution, at least it would prevent the content from jumping too far.

    If there is any way to set this option for tabs on mobile, that could be a temporary solution.

    #415762

    Hi, just checking in to see if you’re still looking in to this.

    Thanks

    #416405

    Hey!

    Sorry for the delay. I was wrong about the typo, please ignore it. The tab seems to be working fine on our installation. The tab scrolls back to the tab title when it’s not in viewport. Please provide a temporary ftp credentials. We would like to inspect it.

    Regards,
    Ismael

    #417525

    Hey, that’s ok. I’m having issues with the ftp accounts with my webhost. I’ll post back as soon as I have one ready. Thanks

    #417533
    This reply has been marked as private.
    #419762

    Hi!

    Sorry for the delay. Please post the WP login details here as well. We need to deactivate the minify settings because any changes we do in the shortcodes.js file will not take any effect.

    Regards,
    Ismael

    #419894
    This reply has been marked as private.
    #420245

    Hi!

    Admin access to WordPress would be great, you can post the details here as a private reply.

    Best regards,
    Rikard

    #420505
    This reply has been marked as private.
    #421461

    Hi!

    I’m sorry but I failed to correct the issue on your installation. The “scoll_target” produces a negative value and the win.scrollTop() is always lesser than the el_offset value. I’ll ask Kriesi to take a look.

    Regards,
    Ismael

    #435509
    This reply has been marked as private.
    #435803

    Hey!

    I tested this again on our installation and the tabs scroll are now working with the latest version of the theme. It does scroll up whenever the tab title is not in viewport. I noticed that you have created custom columns inside the tabs. Can you please create a test page with only text as content? Let us know if the scroll target works there.

    Cheers!
    Ismael

    #440494
    This reply has been marked as private.
    #440718

    Hi!

    I think I know now why the tab scroll target isn’t working. There is an extra scrollbar on your installation but I can’t find where it’s coming from. I didn’t notice it before. Did you add any css overflow property to any containers?

    Best regards,
    Ismael

    #441052

    Hi, yes there is an overflow property set here, which I think you found and commented out:

    /* -- REDUCE TAB AND ACCORDION PADDING ON MOBILE -- 
    @media only screen and (max-width:660px) {
    .tab_content { padding:0 8px!important; }
    .toggle_content { padding:8px!important; overflow:scroll; }
    }
    */

    This hasn’t changed the scrolling behaviour though. I’m going to uncomment it, as it effects my layout.

    That scroll bar looks like it’s on a higher level container. How did it appear? I’ve never seen it before.

    Thanks

    #441441

    Hey!

    Yes, but it’s not the code responsible for the scrollbar. Create a backup of the css modifications then remove all of it. Check if the scrollbar is still there. If not then you have to inspect the custom css codes. What is this code for?

    // CALL JQUERY EQUAL HEIGHTS SCRIPT
    // Enqueue scripts
    add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' );
    function sk_enqueue_scripts() {
    
    	wp_enqueue_script( 'equalheights', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.equalheights.min.js', array( 'jquery' ), '', true );
    	wp_enqueue_script( 'equalheights-init',  get_stylesheet_directory_uri() . '/js/equalheights-init.js', array( 'equalheights' ), '1.0.0', true );
    
    }

    Please remove it temporarily then test the site again.

    Regards,
    Ismael

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Tabs on mobile’ is closed to new replies.