Add dragging offset exception for Firefox

This commit is contained in:
Raphael Wickihalder 2022-04-03 17:02:18 +02:00
parent 052c602742
commit 85d9de60ca
No known key found for this signature in database
GPG key ID: 05179BB92383243D

View file

@ -122,8 +122,10 @@ export default function HomepageSort(props: Props) {
// $FlowFixMe
draggableProvided.draggableProps.style.left = draggedItemRef.offsetLeft;
// $FlowFixMe
draggableProvided.draggableProps.style.top =
draggableProvided.draggableProps.style.top - document.getElementsByClassName('modal')[0].offsetTop;
if (navigator.userAgent.toLowerCase().indexOf('firefox') === -1) {
draggableProvided.draggableProps.style.top =
draggableProvided.draggableProps.style.top - document.getElementsByClassName('modal')[0].offsetTop;
}
}
return (
<div