]> cat aescling's git repositories - mastodon.git/commitdiff
Partially revert scrollbar handling on mobile, since its width-based and wrong
authorThibaut Girka <thib@sitedethib.com>
Sat, 5 Oct 2019 21:21:28 +0000 (23:21 +0200)
committerThibaut Girka <thib@sitedethib.com>
Sat, 5 Oct 2019 22:32:06 +0000 (00:32 +0200)
Have to investigate as to whether it was actually needed on mobile, doesn't
seem to be the case from Firefox's Responsive Design Mode

app/javascript/flavours/glitch/util/scrollbar.js

index 6529b7906f3874cb7f883a89d8364aaf5840520c..929b036d663c4b9886da3a60dd51782b81c2d9eb 100644 (file)
@@ -1,5 +1,3 @@
-import { isMobile } from 'flavours/glitch/util/is_mobile';
-
 /** @type {number | null} */
 let cachedScrollbarWidth = null;
 
@@ -29,7 +27,7 @@ export const getScrollbarWidth = () => {
     return cachedScrollbarWidth;
   }
 
-  const scrollbarWidth = isMobile(window.innerWidth) ? 0 : getActualScrollbarWidth();
+  const scrollbarWidth = getActualScrollbarWidth();
   cachedScrollbarWidth = scrollbarWidth;
 
   return scrollbarWidth;