Add scrollbar to menu if necessary
4 unresolved threads
4 unresolved threads
Merge request reports
Activity
- Resolved by Reiter, Christoph
- Resolved by Reiter, Christoph
- Resolved by Reiter, Christoph
- Resolved by Reiter, Christoph
everything that isn't hardcoding values is better :)
Edited by Reiter, Christoph
added 1 commit
- 7ffa0de5 - Replace hardcoded values and fix overflow calculation
408 409 410 if (this.menuHeight === -1) { 411 this.menuHeight = menu.clientHeight; 412 } 413 414 let topValue = subtitle.getBoundingClientRect().bottom; 415 let isMenuOverflow = this.menuHeight + topValue >= window.innerHeight ? true : false; 416 417 if (isMenuOverflow && !menu.classList.contains('hidden')) { 418 menu.setAttribute('style', 'position: fixed;top: ' + topValue + 'px;bottom: 0;border-bottom: 0;overflow-y: auto;'); 419 menu.scrollTop = 0; 420 document.body.setAttribute('style', 'overflow:hidden;'); 421 422 } else if (isMenuOverflow && menu.classList.contains('hidden')) { 423 document.body.removeAttribute('style', 'overflow:hidden;'); 424 menu.removeAttribute('style', 'position: fixed;top: ' + topValue + 'px;bottom: 0;border-bottom: 0;overflow-y: auto;'); changed this line in version 6 of the diff
mentioned in commit fa68c761
Please register or sign in to reply