Browse Source

fix blank page on click of new window #868

causefx 8 years ago
parent
commit
3cb5de99ec
1 changed files with 8 additions and 5 deletions
  1. 8 5
      js/functions.js

+ 8 - 5
js/functions.js

@@ -263,10 +263,13 @@ function toggleParentActive(tab){
 	}
 	}
 }
 }
 function switchTab(tab, type){
 function switchTab(tab, type){
-	hideFrames();
-	closeSideMenu();
-	removeMenuActive();
-	toggleParentActive(tab);
+    if(type !== 2){
+        hideFrames();
+        closeSideMenu();
+        removeMenuActive();
+        toggleParentActive(tab);
+        setHash(tab);
+    }
 	switch (type) {
 	switch (type) {
 		case 0:
 		case 0:
 		case '0':
 		case '0':
@@ -317,7 +320,7 @@ function switchTab(tab, type){
 		default:
 		default:
 			console.error('Tab Function: Action not set');
 			console.error('Tab Function: Action not set');
 	}
 	}
-	setHash(tab);
+
 }
 }
 function popTab(tab, type){
 function popTab(tab, type){
 	switch (type) {
 	switch (type) {