Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-web
ensembl-client
Commits
53703874
Unverified
Commit
53703874
authored
Apr 27, 2021
by
Andrey Azov
Committed by
GitHub
Apr 27, 2021
Browse files
Fix the position of the ViewInApp popup while scrolling (#494)
parent
e6ea1356
Pipeline
#150923
passed with stages
in 5 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
src/ensembl/src/shared/components/view-in-app-popup/ViewInAppPopup.scss
...c/shared/components/view-in-app-popup/ViewInAppPopup.scss
+4
-0
src/ensembl/src/shared/components/view-in-app-popup/ViewInAppPopup.tsx
...rc/shared/components/view-in-app-popup/ViewInAppPopup.tsx
+2
-1
No files found.
src/ensembl/src/shared/components/view-in-app-popup/ViewInAppPopup.scss
View file @
53703874
@import
'src/styles/common'
;
.wrapper
{
position
:
relative
;
}
.pointerBox
{
padding
:
6px
12px
;
background
:
$black
;
...
...
src/ensembl/src/shared/components/view-in-app-popup/ViewInAppPopup.tsx
View file @
53703874
...
...
@@ -34,11 +34,12 @@ const ViewInAppPopup = (props: ViewInAppPopupProps) => {
const
anchorRef
=
useRef
<
HTMLSpanElement
>
(
null
);
return
(
<
span
ref
=
{
anchorRef
}
onClick
=
{
()
=>
setShowPointerBox
(
!
showPointerBox
)
}
>
<
span
className
=
{
styles
.
wrapper
}
ref
=
{
anchorRef
}
onClick
=
{
()
=>
setShowPointerBox
(
!
showPointerBox
)
}
>
{
children
}
{
showPointerBox
&&
anchorRef
.
current
&&
(
<
PointerBox
anchor
=
{
anchorRef
.
current
}
renderInsideAnchor
=
{
true
}
onOutsideClick
=
{
()
=>
setShowPointerBox
(
false
)
}
position
=
{
props
.
position
}
autoAdjust
=
{
true
}
...
...
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