While dragging an element, it obtains a position: fixed
. This particular element is located within a modal that is directly nested inside the body
element.
In the image below, the modal appears in gray, while the rest of the body is black, and the button stands out in blue. The issue arises when I apply the following styles to the button:
position: fixed;
top: xxxpx;
left: -100px;
Interestingly, the button gets positioned in relation to the modal rather than the viewport. It seems as though an element with position: fixed
behaves like an absolutely positioned element instead. Is this scenario even plausible?