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

Floating Panel close automatically after change in PR #551 #561

Closed
bvaillant-clgx opened this issue Aug 30, 2022 · 6 comments · Fixed by #563
Closed

Floating Panel close automatically after change in PR #551 #561

bvaillant-clgx opened this issue Aug 30, 2022 · 6 comments · Fixed by #563

Comments

@bvaillant-clgx
Copy link

bvaillant-clgx commented Aug 30, 2022

I'm using the Floating Panel to show a page with lots of informations but since the last update (2.5.3) every times I try to open it the floating panel close itself.

I found out that if I put the line added in the PR #551 in comment, my problem is not there anymore.

My panel are shown modally

I also have special code that dismiss the FloatingPanelController when the state is hidden that I absolutely need.
func floatingPanelDidMove(_ fpc: FloatingPanelController) { if fpc.state == .hidden { fpc.dismiss(animated: true, completion: { ... } }) } }

@scenee
Copy link
Owner

scenee commented Aug 31, 2022

Thank you for this report. I understood the side effect of the code.
Let me check one thing. Is your panel's state always .hidden when this problem happens?
Because I'm thinking that I will replace it with an assertion.

@bvaillant-clgx
Copy link
Author

It is a new panel that I create that I try to open in full or half. I see the panel going to the right position but then it close itself automatically

@scenee
Copy link
Owner

scenee commented Sep 1, 2022

Thanks. I created iss-561 branch. Could you try it in your app?

@bvaillant-clgx
Copy link
Author

Thanks for the quick reply. It is working with your new branch.

@scenee
Copy link
Owner

scenee commented Sep 5, 2022

Thanks for your confirmation. I'm going to merge the branch into the main line in PR #563.

scenee added a commit that referenced this issue Sep 7, 2022
This resolves issue #561. Instead of continuing to work a modal presentation transition even if a panel state is not .hidden, this library calls fatalError as a programmer error on the occasion.
@scenee
Copy link
Owner

scenee commented Sep 7, 2022

@bvaillant-clgx I merged iss-561 branch, and then I will release it in the next release, v2.5.4. Thank you so much.

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

Successfully merging a pull request may close this issue.

2 participants