Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
rpg-workshop
Commits
5651f7f8
Commit
5651f7f8
authored
Nov 11, 2021
by
Joe Ziemba
Browse files
fix scrolling issues on firefox
parent
cf814c4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/common/Modal.js
View file @
5651f7f8
...
...
@@ -15,7 +15,15 @@ export const Modal = ({
document
.
body
.
style
.
overflow
=
"
hidden
"
}
return
()
=>
(
document
.
body
.
style
.
overflow
=
"
overlay
"
)
return
()
=>
{
// https://codepedia.info/detect-browser-in-javascript
let
userAgent
=
navigator
.
userAgent
if
(
userAgent
.
match
(
/firefox|fxios/i
))
{
document
.
body
.
style
.
overflow
=
"
auto
"
}
else
{
document
.
body
.
style
.
overflow
=
"
overlay
"
}
}
},
[
show
])
if
(
!
show
)
return
null
...
...
src/index.css
View file @
5651f7f8
...
...
@@ -15,9 +15,15 @@ body,
line-height
:
125%
;
}
*
{
/* Firefox scrollbar */
scrollbar-width
:
thin
;
scrollbar-color
:
rgba
(
0
,
0
,
0
,
0.5
)
rgba
(
243
,
244
,
246
,
1
);
}
body
{
overflow
:
overlay
;
overflow-x
:
hidden
;
overflow
:
overlay
;
}
body
::-webkit-scrollbar
{
...
...
@@ -30,6 +36,7 @@ body::-webkit-scrollbar-thumb {
}
.scroller
{
overflow-y
:
auto
;
overflow-y
:
overlay
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment