-
Notifications
You must be signed in to change notification settings - Fork 487
Closed
Labels
area/viewsIssue/Discussion/PR that has to do with ViewsIssue/Discussion/PR that has to do with ViewsbugSomething isn't workingSomething isn't workingunverified
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
When a behavior is added to the view's Behaviors collection, and the PopupService ShowPopup [or ShowPopupAsync] method is called, the behavior is re-attached even though it was already in the behaviors collection.
Expected Behavior
The behavior is only attached once, even if ShowPopup is called.
Steps To Reproduce
- Open the Issue.PlatformBehaviorPopupService solution and run the application
- Notice the Debug 'Output' window and see the 'attached' events
- Click the 'Click me!' button
- Monitor the Debug 'Output' window and notice that a new 'attached' event logged each time the button is clicked
Link to public reproduction project repository
https://github.com/bengavin/maui-issue-repros/tree/main/Issue.PlatformBehaviorPopupService
Environment
- .NET MAUI CommunityToolkit: 9
- OS: Windows
- .NET MAUI: 8.0.40Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/viewsIssue/Discussion/PR that has to do with ViewsIssue/Discussion/PR that has to do with ViewsbugSomething isn't workingSomething isn't workingunverified