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

[BUG] Popup is not closing when background is clicked #660

Closed
1 task done
xDaijobu opened this issue Sep 28, 2022 · 3 comments · Fixed by #661
Closed
1 task done

[BUG] Popup is not closing when background is clicked #660

xDaijobu opened this issue Sep 28, 2022 · 3 comments · Fixed by #661
Labels
bug Something isn't working in-progress

Comments

@xDaijobu
Copy link

xDaijobu commented Sep 28, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Work well on IOS but I have some issues on Android

  1. changing CanBeDismissedByTappingOutsideOfPopup is not working at runtime
  2. Loaded is not called

Screen Shot 2022-09-28 at 09 37 50

sorry for the watermark in the video @-@

ScreenRecorderProject1.mp4

Expected Behavior

  1. When CloseWhenBackgroundIsClicked is set to true, the popup should close when the background is clicked.
  2. Loaded should be called

Steps To Reproduce

  1. Open & run the solution
  2. click the button & observe the bug

Link to public reproduction project repository

https://github.com/xDaijobu/ToolkitPopupAndroid/tree/master/Popup

Environment

- .NET MAUI CommunityToolkit: 1.3.0
- OS: MacOS Monterey
- .NET MAUI: 7 RC1
- Android API 30
- iOS 15.5

Anything else?

No response

@xDaijobu xDaijobu added bug Something isn't working unverified labels Sep 28, 2022
@pictos
Copy link
Member

pictos commented Sep 28, 2022

@xDaijobu thanks for reporting the issue. About the VisualElement.Loaded events aren't getting fired part, we can't fix it here... At least I can't see a way to do that.

The Popup is an Element and doesn't have the Loaded/Unloaded events. These events are triggered by the VisualElement class, and I didn't find a way to fire that event outside.
So I don't think it's a bug, but a limitation by design.

If this feature is important to you, please open a new discussion asking for it, and I'll circle back to the .NET MAUI team and see if there's something that I'm missing.

So, I'll remove the Loaded part for this issue.

@pictos pictos changed the title [BUG] Popup is not closing when background is clicked & VisualElement.Loaded events aren't getting fired [BUG] Popup is not closing when background is clicked Sep 28, 2022
@xDaijobu
Copy link
Author

hi @pictos,
Thank you for the quick fix!

The Popup is an Element and doesn't have the Loaded/Unloaded events

but Popup.Content is View and the View class inherits from VisualElement @.@

Screen Shot 2022-09-28 at 13 15 50

If this feature is important to you, please open a new discussion asking for it, and I'll circle back to the .NET MAUI team and see if there's something that I'm missing.

roger that, thanks!

btw, it looks like there is another bug in the Popup..
IconTintColorBehavior not working inside popup.. ( Android )
Screen Shot 2022-09-28 at 14 41 17

Should I open a new issue for it?

@pictos pictos reopened this Sep 28, 2022
@pictos
Copy link
Member

pictos commented Sep 28, 2022

@xDaijobu For the behavior, please open a new issue

Reopening this because the PR isn't merged yet

@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working in-progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants