Commit ac76e11a authored by Arthur Verschaeve's avatar Arthur Verschaeve

Merge pull request #1377 from ahmedelgabri/homepage-responsive-clipping

Homepage responsive, don't set height on innerList.
parents 708e46db 73351789
...@@ -207,15 +207,14 @@ ...@@ -207,15 +207,14 @@
var isSelected = el.dataset.appList === selected; var isSelected = el.dataset.appList === selected;
el.style.display = isSelected ? 'block' : 'none'; el.style.display = isSelected ? 'block' : 'none';
if (isSelected) { if (isSelected) {
this.adjustHeight(el); this.switchTab(el);
} }
}.bind(this) }.bind(this)
); );
}; };
AppTabs.prototype.adjustHeight = function (e) { AppTabs.prototype.switchTab = function (e) {
var list = e.querySelector(AppTabs.selectors.innerList); var list = e.querySelector(AppTabs.selectors.innerList);
list.style.height = this.listHeight + 'px';
var $clone = $(list) var $clone = $(list)
.clone() .clone()
.css({ visibility: 'hidden' }) .css({ visibility: 'hidden' })
...@@ -223,9 +222,7 @@ ...@@ -223,9 +222,7 @@
.appendTo(list.parentElement); .appendTo(list.parentElement);
window.requestAnimationFrame(function () { window.requestAnimationFrame(function () {
var naturalHeight = this.listHeight = $clone.outerHeight();
$clone.remove(); $clone.remove();
list.style.height = naturalHeight + 'px';
}.bind(this)); }.bind(this));
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment