LeoNatan / LNPopupUI

A SwiftUI library for presenting views as popups, much like the Apple Music and Podcasts apps.
MIT License
320 stars 29 forks source link

After adding .popupBarStyle(.prominent) or .popupBarProgressViewStyle(.top) or .popupBarMarqueeScrollEnabled(true) to the View hierarchy, iOS keyboard will resign after single keypress #17

Closed mazz closed 1 year ago

mazz commented 2 years ago

Describe the Bug using any or all of these modifiers will interfere with the first responder:

        .popupBarStyle(.prominent)
        .popupBarProgressViewStyle(.top)
        .popupBarMarqueeScrollEnabled(true)

NOTE .popup() alone does NOT interfere with first responder.

when entering text in another TabView's TextField, the keyboard will resign after every key press.

To Reproduce Steps to reproduce the behavior:

  1. add any or all of: .popupBarStyle(.prominent) .popupBarProgressViewStyle(.top) .popupBarMarqueeScrollEnabled(true)
  2. enter text in a TextField
  3. Observe the keyboard resigning after first keypress

Expected Behavior Keyboard/first responder does not resign

Screenshots Made a video.

Additional Context none

https://user-images.githubusercontent.com/808934/186574265-42dc9c82-eba6-4144-82f7-99b05ffc99ac.MP4

LeoNatan commented 2 years ago

Hello, Thank you for reporting this issue. I am preoccupied with real-world issues and not sure when I will have time to investigate this. If you can, please assist with debugging, to see when the the first responder resigns. You could add a symbolic breakpoint for resignFirstResponder and see why/where it gets called. Thanks

LeoNatan commented 1 year ago

I cannot reproduce this issue. I’ve added a text input in the popup container view, as well as in the popup content view, and I can type in both just fine.

https://user-images.githubusercontent.com/2270433/195081023-8db36a1c-a6d3-4409-be63-98bb897298fc.mp4

Since there has been no response to this issue, I am closing it. If you are able to reproduce in a demo project, please attach it here.

mazz commented 1 year ago

Sorry I didn’t get around to it, I had to switch to another project. Once I return back I will attempt to repro it again.