mirror of
https://github.com/MCKero6423/fuwari.git
synced 2026-10-02 03:15:35 +00:00
fix: don't initialize the overlay scrollbar if there is a native one
This commit is contained in:
1 parent
4316654a98
commit
31bb0d576e
1 file changed
+11
-3
@@ -279,13 +279,21 @@ function setBannerHeight() {
|
||||
}
|
||||
|
||||
function initCustomScrollbar() {
|
||||
OverlayScrollbars(document.querySelector('body'), {
|
||||
OverlayScrollbars(
|
||||
// docs say that a initialization to the body element would affect native functionality like window.scrollTo
|
||||
// but just leave it here for now
|
||||
{
|
||||
target: document.querySelector('body'),
|
||||
cancel: {
|
||||
nativeScrollbarsOverlaid: true, // don't initialize the overlay scrollbar if there is a native one
|
||||
}
|
||||
}, {
|
||||
scrollbars: {
|
||||
theme: 'scrollbar-base scrollbar-auto py-1',
|
||||
autoHide: 'move',
|
||||
autoHideDelay: 500,
|
||||
autoHideSuspend: false
|
||||
}
|
||||
autoHideSuspend: false,
|
||||
},
|
||||
});
|
||||
document.querySelectorAll('pre').forEach((ele) => {
|
||||
OverlayScrollbars(ele, {
|
||||
|
||||
Reference in new issue
Block a user