Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
78b2b6ed
Commit
78b2b6ed
authored
Sep 29, 2020
by
Markus Scheidgen
Browse files
Fixed firefox scrollbars and resizing issues with archive browser. #426
parent
34005e1a
Pipeline
#83248
passed with stages
in 20 minutes and 44 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
gui/src/components/archive/Browser.js
View file @
78b2b6ed
...
...
@@ -42,7 +42,7 @@ const useBrowserStyles = makeStyles(theme => ({
scrollBehavior
:
'
smooth
'
},
lanes
:
{
display
:
'
tab
le
'
,
display
:
'
f
le
x
'
,
overflow
:
'
scroll
'
,
height
:
'
100%
'
,
overflowY
:
'
hidden
'
,
...
...
@@ -56,10 +56,15 @@ export default function Browser({adaptor, form}) {
const
innerRef
=
useRef
()
useLayoutEffect
(()
=>
{
function
update
()
{
const
height
=
window
.
innerHeight
-
outerRef
.
current
.
getBoundingClientRect
().
top
-
24
rootRef
.
current
.
style
.
height
=
`
${
height
}
px`
const
scrollAmmount
=
innerRef
.
current
.
clientWidth
-
outerRef
.
current
.
clientWidth
outerRef
.
current
.
scrollLeft
=
Math
.
max
(
scrollAmmount
,
0
)
}
update
()
window
.
addEventListener
(
'
resize
'
,
update
)
return
()
=>
window
.
removeEventListener
(
'
resize
'
,
update
)
})
const
{
pathname
}
=
useLocation
()
...
...
@@ -113,7 +118,7 @@ const useLaneStyles = makeStyles(theme => ({
minWidth
:
200
,
maxWidth
:
512
,
borderRight
:
`solid 1px
${
grey
[
500
]}
`
,
display
:
'
table-cell
'
display
:
'
block
'
},
container
:
{
display
:
'
block
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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