diff --git a/frontend-js/src/main/js/gui/Panel.js b/frontend-js/src/main/js/gui/Panel.js
index 7bcd30e8c0ba5cf2da1e34e367c29c489da89076..4bd37916f1119fdfd107e9a597202349cdd333cf 100644
--- a/frontend-js/src/main/js/gui/Panel.js
+++ b/frontend-js/src/main/js/gui/Panel.js
@@ -258,23 +258,26 @@ Panel.prototype.onresize = function() {
   // compute the width (we can only compute it for visible elements)
   var size = 100000;
 
-  $(".pre-scrollable", self.getElement()).each(function(index, element) {
-    if ($(element).is(":visible")) {
-      size = Math.min(size, footerPosition - $(element).offset().top);
-    }
-  });
-  if ($(self.getElement()).hasClass("pre-scrollable") && $(self.getElement()).is(":visible")) {
-    size = Math.min(size, footerPosition - $(self.getElement()).offset().top);
-  }
-  if (size !== 100000) {
+  if ($(self.getElement()).is(":visible")) {
+
     $(".pre-scrollable", self.getElement()).each(function(index, element) {
-      $(element).css('max-height', size);
-      $(element).css('height', size);
+      if ($(element).is(":visible")) {
+        size = Math.min(size, footerPosition - $(element).offset().top);
+      }
     });
-  }
-  if ($(self.getElement()).hasClass("pre-scrollable") && $(self.getElement()).is(":visible")) {
-    $(self.getElement()).css('max-height', size);
-    $(self.getElement()).css('height', size);
+    if ($(self.getElement()).hasClass("pre-scrollable") && $(self.getElement()).is(":visible")) {
+      size = Math.min(size, footerPosition - $(self.getElement()).offset().top);
+    }
+    if (size !== 100000) {
+      $(".pre-scrollable", self.getElement()).each(function(index, element) {
+        $(element).css('max-height', size);
+        $(element).css('height', size);
+      });
+    }
+    if ($(self.getElement()).hasClass("pre-scrollable") && $(self.getElement()).is(":visible")) {
+      $(self.getElement()).css('max-height', size);
+      $(self.getElement()).css('height', size);
+    }
   }
 
 };
diff --git a/frontend-js/src/main/js/gui/leftPanel/SearchPanel.js b/frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
index 2c6dd1d01175c4334b09e38afff3694948794be5..fd9775099dc73153100940b9447cbe81b7036017 100644
--- a/frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
+++ b/frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
@@ -4,7 +4,7 @@ var Promise = require("bluebird");
 
 /* exported logger */
 
-var AbstractGuiElement = require('../AbstractGuiElement');
+var Panel = require('../Panel');
 var ChemicalPanel = require('./ChemicalPanel');
 var DrugPanel = require('./DrugPanel');
 var MiRnaPanel = require('./MiRnaPanel');
@@ -14,7 +14,8 @@ var Functions = require('../../Functions');
 var logger = require('../../logger');
 
 function SearchPanel(params) {
-  AbstractGuiElement.call(this, params);
+  params.panelName = "global-search";
+  Panel.call(this, params);
   var self = this;
 
   this._tabIdCount = 0;
@@ -24,7 +25,7 @@ function SearchPanel(params) {
 
 }
 
-SearchPanel.prototype = Object.create(AbstractGuiElement.prototype);
+SearchPanel.prototype = Object.create(Panel.prototype);
 SearchPanel.prototype.constructor = SearchPanel;
 
 SearchPanel.prototype._createPanelGui = function() {