Skip to content

Commit

Permalink
fix: drag shadow on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
Accir committed Dec 1, 2023
1 parent 3169578 commit 7b06159
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/events/createShadow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export const createShadow = (
if (shadowsToCreate.length === 1 || forceSingleShadow) {
const { width, height } = shadowsToCreate[0].getBoundingClientRect();
const shadow = shadowsToCreate[0].cloneNode(true) as HTMLElement;

shadow.style.position = `absolute`;
shadow.style.left = `-100%`;
shadow.style.top = `-100%`;
shadow.style.width = `${width}px`;
shadow.style.height = `${height}px`;
shadow.style.pointerEvents = 'none';
shadow.style.background = 'white';
shadow.classList.add('drag-shadow');

document.body.appendChild(shadow);
Expand All @@ -34,7 +34,6 @@ export const createShadow = (
container.style.width = '100%';
container.style.height = '100%';
container.style.pointerEvents = 'none';
container.style.background = 'white';
container.classList.add('drag-shadow-container');

shadowsToCreate.forEach((dom) => {
Expand Down

0 comments on commit 7b06159

Please sign in to comment.