fixup/cosmetics
This commit is contained in:
parent
4601a136a9
commit
3ee502c3a4
|
@ -112,9 +112,11 @@ window.addEventListener('showStyles:done', function _() {
|
||||||
|
|
||||||
addEventListener('scroll', loadMoreIfNeeded, {passive: true});
|
addEventListener('scroll', loadMoreIfNeeded, {passive: true});
|
||||||
if (FIREFOX) {
|
if (FIREFOX) {
|
||||||
|
let lastScrollbarWidth;
|
||||||
addEventListener('resize', () => {
|
addEventListener('resize', () => {
|
||||||
const scrollbarWidth = window.innerWidth - document.scrollingElement.clientWidth;
|
const scrollbarWidth = window.innerWidth - document.scrollingElement.clientWidth;
|
||||||
if (scrollbarWidth !== parseFloat(document.body.style.paddingRight)) {
|
if (lastScrollbarWidth !== scrollbarWidth) {
|
||||||
|
lastScrollbarWidth = scrollbarWidth;
|
||||||
dom.marginLeft = dom.marginLeft || parseFloat(getComputedStyle(dom.container).marginLeft);
|
dom.marginLeft = dom.marginLeft || parseFloat(getComputedStyle(dom.container).marginLeft);
|
||||||
const shift = dom.container.getBoundingClientRect().left - dom.marginLeft;
|
const shift = dom.container.getBoundingClientRect().left - dom.marginLeft;
|
||||||
document.body.style.setProperty('padding',
|
document.body.style.setProperty('padding',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user