Fix element position when dragged in homepage customizer

This commit is contained in:
Raphael Wickihalder 2022-04-03 15:19:05 +02:00
parent b7b27136fd
commit a6169a80a9
No known key found for this signature in database
GPG key ID: 05179BB92383243D
2 changed files with 8 additions and 5 deletions

View file

@ -122,7 +122,8 @@ export default function HomepageSort(props: Props) {
// $FlowFixMe
draggableProvided.draggableProps.style.left = draggedItemRef.offsetLeft;
// $FlowFixMe
draggableProvided.draggableProps.style.top = draggedItemRef.offsetTop;
// draggableProvided.draggableProps.style.top = draggedItemRef.offsetTop;
draggableProvided.draggableProps.style.top = draggableProvided.draggableProps.style.top - 50;
}
return (
<div

View file

@ -9,18 +9,19 @@
background-color: var(--color-ads-background);
padding: var(--spacing-s);
margin-right: var(--spacing-s);
border: 1px solid var(--color-border);
overflow: auto;
overflow-x: hidden;
border-radius: var(--border-radius);
outline: 1px solid var(--color-border);
}
.homepage-sort__bin--dashed {
border: dashed var(--color-border);
outline: dashed var(--color-border);
}
.homepage-sort__bin--highlight {
border-color: var(--color-primary);
border-width: 2px;
outline-color: var(--color-primary);
outline-width: 2px;
}
.homepage-sort__bin--no-bg {
@ -42,6 +43,7 @@
padding: var(--spacing-xs) var(--spacing-m) var(--spacing-xs) var(--spacing-m);
align-items: center;
font-size: var(--font-small);
border-radius: var(--border-radius);
svg {
margin-top: var(--spacing-xxs);