Skip to content

Commit 9fad212

Browse files
authored
Merge pull request #45758 from wgordon17/fix-search-bar-2
Move search resizing adjustments to function
2 parents 376f871 + 44d5675 commit 9fad212

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_templates/_page_openshift.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,6 @@
280280

281281
window.addEventListener('resize', () => {
282282
if ($(window).width() >= 1008) {
283-
sidebar.classList.add('wide');
284-
document.querySelector('#hc-search').classList.add('wide');
285-
sidebar.style.display = 'block';
286283
adjustSide();
287284
adjustToc();
288285
adjustMain();
@@ -299,6 +296,9 @@
299296
});
300297

301298
function adjustSide() {
299+
sidebar.classList.add('wide');
300+
document.querySelector('#hc-search').classList.add('wide');
301+
sidebar.style.display = 'block';
302302
document.querySelector('.sidebar').style.top = parseInt((document.querySelector('.breadcrumb').offsetHeight + 125), 10) + "px";
303303
document.querySelector('#hc-search').style.top = parseInt((document.querySelector('.breadcrumb').offsetHeight + 95), 10) + "px";
304304
}

0 commit comments

Comments
 (0)