UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

31 lines (24 loc) 601 B
let rtlHasScrollBug = false // mobile Chrome takes the crown for this if (!__QUASAR_SSR__) { const scroller = document.createElement('div') scroller.setAttribute('dir', 'rtl') Object.assign(scroller.style, { width: '1px', height: '1px', overflow: 'auto' }) const spacer = document.createElement('div') Object.assign(spacer.style, { width: '1000px', height: '1px' }) document.body.appendChild(scroller) scroller.appendChild(spacer) scroller.scrollLeft = -1000 rtlHasScrollBug = scroller.scrollLeft >= 0 scroller.remove() } export { rtlHasScrollBug }