Tb Sirate and TB Mega Menu produce double menu buttons in Mobile view

+1
0
-1

I have installed tb sirate + tb mega menu module. I set tb mega menu in the menu bar (and disabled the default main menu from blocks). The result is that in mobile view the menus are duplicated. Whenever you need to expand the menu two icons are shown, one for the "normal" menu (black background button with white lines) and when I click on that button, another button appear.
I'm running the latest version of TB Sirate (Tb Sirate 7.x-1.0) and TB Mega Menu (7.x-1.0-beta2). I have tried suggestions from other posts like setting block and region settings to raw, but this did not help. I should note that I have my TB Mega menu in the menu block region of sirate.

See related drupal .org issue's here:
https://drupal.org/node/2030695
https://drupal.org/node/2031667#comment-8660965

+1
0
-1

Hi John,

TB Sirate theme does support responsive behavior by itself for the menu bar region and TB Mega Menu also supports responsive behavior by its own. This leads to double icons issue in mobile. Here is a quick fix for it:
* Open the file tb_sirate/js/tb_responsive.js
* Replace code of Drupal.behaviors.actionTBResponsive from line 31 to 44 by following code:
Drupal.behaviors.actionTBResponsive = {
attach: function (context) {
if($('#menu-bar-wrapper .tb-megamenu').length) return;
Drupal.TBResponsive.initResponsiveMenu();
$(window).resize(function(){
var windowWidth = window.innerWidth ? window.innerWidth : $(window).width();
if(windowWidth != Drupal.TBResponsive.oldWindowWidth){
Drupal.TBResponsive.updateResponsiveMenu();
Drupal.TBResponsive.oldWindowWidth = windowWidth;
}
});
}
};

* Save the file

This solution is posted to both related issues on drupal.org.

Kind regards,
Will