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 @@
var isSelected = el.dataset.appList === selected;
el.style.display = isSelected ? 'block' : 'none';
if (isSelected) {
this.adjustHeight(el);
this.switchTab(el);
}
}.bind(this)
);
};
AppTabs.prototype.adjustHeight = function (e) {
AppTabs.prototype.switchTab = function (e) {
var list = e.querySelector(AppTabs.selectors.innerList);
list.style.height = this.listHeight + 'px';
var $clone = $(list)
.clone()
.css({ visibility: 'hidden' })
......@@ -223,9 +222,7 @@
.appendTo(list.parentElement);
window.requestAnimationFrame(function () {
var naturalHeight = this.listHeight = $clone.outerHeight();
$clone.remove();
list.style.height = naturalHeight + 'px';
}.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