Mijick / PopupView

Popups presentation made simple (SwiftUI)
MIT License
1.08k stars 42 forks source link

Modification of the original view position #100

Closed dentvii closed 1 month ago

dentvii commented 2 months ago

ScreenRecording2024-05-21at15 17 24-ezgif com-video-to-gif-converter

Issue Description

When implementing a pop-up, the view in which it is hosted is altered. The view should only be as big as its container, but when the pop-up is implemented, it shifts to the top leading position, modifying the view itself.

Steps to Reproduce

  1. Create a small view:
    • Create a view that is relatively small.
  2. Implement the pop-up:
    • Add the pop-up to the small view.

Observed Behavior

Suggested Solution

Wrap the view in a container to protect its location and size, especially if the view is small. This might be an edge case, as most developers will implement a full view to start their application, but it's worth noting that the original view is modified.

FulcrumOne commented 2 months ago

Good finding @dentvii, thanks! Patch-2.4.2 branch solves this problem too