Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover inside Scrollview not supported? #85

Open
PixelPirate opened this issue May 20, 2023 · 1 comment
Open

Popover inside Scrollview not supported? #85

PixelPirate opened this issue May 20, 2023 · 1 comment

Comments

@PixelPirate
Copy link

When attaching a popover to a view inside a scrollView, the popover will remain at fixed position when scrolling. It seems to be impossible to let the popover follow the attached view.

Is this a bug or a missing feature?

ScrollView {
    
    TextField()
    .popover(
        present: $focusedTextField,
        attributes: {
            $0.position = .absolute(
                originAnchor: .top,
                popoverAnchor: .bottom
            )
            $0.sourceFrame = { rectOfTextField }
            $0.sourceFrameInset.top = -16
            $0.rubberBandingMode = .none
            $0.dismissal = .init(
                mode: .none,
                dragMovesPopoverOffScreen: false
            )
        }
    ) {
        Templates.Container()
    }
}
@aheze
Copy link
Owner

aheze commented May 20, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants