Possible issue with Responsive Tabs.

5 replies·opened Nov 24, 2017
V
vilallongaNov 24, 2017

Problem 1:

<div class="tabs tabs-responsive clearfix" id='tabs1' data-active="2">

By adding data-active = “2”, in desktop mode, the tab number 2 is selected, but it does not work in mobile size mode, ( @media (max-width: 767px ); where, no matter what, it always selects tab number 1.
Tested: desktop & mobile browsers.

Problem 2:

But the big problem comes when you are in mobile size mode, ( @media (max-width: 767px ), and select a tab, other then 1, the moment you scroll up or down, it automatically changes back to tab number 1…

Tested with:
Canvas 4.3, 4.4, 4.5.1
Android: 7.0.0
Android: 6.0.1

Problem in:
Chrome for Android: 62.0.3202.84
Firefox for Android 57.0
Surf Browser Beta
Internet de Samsung 6.2.01.12

Works in:
InBrowser v2.41.1 (75)

Source code: http://shelly.es/tabs1.html

V
vilallongaDec 22, 2017

Nobody answer my post, and I need to know if this is a bug or I can do something about it.
Please let me know as soon as posible.
Thank you.

S
SemiColonWebSTAFFDec 23, 2017

Hello,

We Really Apologize about the Delays in replying to your Support Query! We had completely missed it!

We are going through the Responsive Tabs thoroughly according to what you have explained to us (thank you so much for the very elaborate explanation) and provide you with a solution shortly. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

S
SemiColonWebSTAFFDec 28, 2017

Hello,

Thanks for your Patience!

  1. This feature was not available previously. But you can enable this by updating the tabsResponsiveResize: function() Function Block with the following code:
tabsResponsiveResize: function(){

	if( !$().tabs ) {
		console.log('tabs: Tabs not Defined.');
		return true;
	}

	var $tabsResponsive = $('.tabs.tabs-responsive:not(.customjs)');
	if( $tabsResponsive.length < 1 ) { return true; }

	$tabsResponsive.each( function(){
		var element = $(this),
			tabActive = element.attr('data-active'),
			elementAccStyle = element.attr('data-accordion-style');

		if( $('body').hasClass('device-xs') || $('body').hasClass('device-xxs') ) {

			element.find('.tab-nav').addClass('hidden-xs');
			element.find('.tab-container').addClass('accordion '+ elementAccStyle +' clearfix').attr('data-active', tabActive);
			element.find('.tab-content').addClass('acc_content');
			element.find('.acctitle').removeClass('hidden-xs');
			SEMICOLON.widget.accordions();

		} else if( $('body').hasClass('device-sm') || $('body').hasClass('device-md') || $('body').hasClass('device-lg') ) {

			element.find('.tab-nav').removeClass('hidden-xs');
			element.find('.tab-container').removeClass('accordion '+ elementAccStyle +' clearfix').attr('data-active', '');
			element.find('.tab-content').removeClass('acc_content');
			element.find('.acctitle').addClass('hidden-xs');
			element.tabs( "refresh" );

		}
	});
},
  1. Unfortunately, this is currently not supported on Browser Resize since the Accordions/Tabs have to be refreshed. To solve this issue you will need to disable the refresh the Accordions/Tabs functionality on Browser Resize which is currently not recommended as it will cause some unexpected issues. You can disable this by deleting the SEMICOLON.widget.tabsResponsiveResize(); Function from the SEMICOLON.documentOnResize > init: function() Function Block in the js/functions.js File.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

V
vilallongaJan 17, 2018

Dear Sirs.
Thank you for your effort regarding the Tabs problem.
I performed the changes that you suggested me un functions.js, then, I tested extensibly, but it did not solve any of the two problems.
Thank you anyway.
Please let us know if this can be addressed in future upgrades.

S
SemiColonWebSTAFFJan 23, 2018

Hello,

We just released an Update to the Responsive Tabs functionality. Can you please check to see if this is working fine now. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard