CommunityToolkit / CommunityToolkit/Maui

[BUG] Snackbar is not shown on second window

Open
#2,638 4 comments 0 reactions 0 assignees View on GitHub
bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [x] 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 working with a multi-window app on iOS and Android and it is required to show a snackbar on main window from second window. The snackbar keeps being shown from invoked view (second window), although an anchor from main window is provided and/or action dispatched from main window.

![Image](https://github.com/user-attachments/assets/f67f1b3e-47ce-449f-8ea6-e3a5809bddac)

### Expected Behavior

A snackbar should be shown on the window where the anchor was provided

### Steps To Reproduce

1. Create a multi-window app
2. Launch the app on iOS or Android
3. Open a new window and enable split view
4. From second window tries to show a snackbar on main window

### Link to public reproduction project repository

https://github.com/vitorelli/SnackBarMultiWindow

### Environment

```markdown
- .NET MAUI CommunityToolkit: 11.2.0
- OS: Android 34, iOS 18
- .NET MAUI: 9.0.60
```

### Anything else?

If platform API is used to show the same snackbar and an anchor is provide no issue is noticed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.