Skip to content

Uno Platform ComboBox Bug - Multi-Window Focus Issue on macOS Skia #21864

@moilotus

Description

@moilotus

Current behavior 🐛

Summary

On macOS Skia, ComboBox controls become unresponsive after opening a secondary window, interacting with it, and returning to the main window. The ComboBox receives pointer events but the dropdown won't open. Alt-tabbing away and back temporarily fixes it.

The sample below runs fine on a PC, but not on macOS.

Expected behavior 🎯

The combo box should work as normal.

How to reproduce it (as minimally and precisely as possible) 🔬

Minimal repo here:
https://github.com/moilotus/uno-combobox-bug-sample

Trigger the bug:

  • Click ComboBox → ✅ Works
  • Click "Open Secondary Window"
  • Double-click any TreeView item
  • Click ComboBox again → ❌ Doesn't open

Workaround 🛠️

Temporary fix:

  • Alt-Tab away and back
  • ComboBox works again ✅

In Code, we have put a listener in place:

// Listen for ComboBox pointer events and force dropdown open if needed
this.AddHandler(PointerPressedEvent, new PointerEventHandler((sender, args) =>
{
var source = args.OriginalSource?.GetType().Name ?? "null";

// Detect clicks on ComboBox elements
if ((source == "ImplicitTextBlock" || source.Contains("ComboBox")) && MyComboBox != null)
{
    // Re-enable if disabled (sometimes happens in broken state)
    if (!MyComboBox.IsEnabled)
    {
        MyComboBox.IsEnabled = true;
    }

    // If enabled but dropdown not opening, force it open
    if (MyComboBox.IsEnabled && !MyComboBox.IsDropDownOpen)
    {
        args.Handled = true;
        DispatcherQueue?.TryEnqueue(() =>
        {
            MyComboBox.IsDropDownOpen = true;
        });
    }
}

}), handledEventsToo: true);

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

Desktop (macOS)

Uno.Sdk version (and other relevant versions) 📦

Platform: macOS with Skia Desktop
Uno Version: 6.4.26
Sample runs .net 9, but my main app still has this today running .net 10.

IDE version 🧑‍💻

Rider 2025.3.0.1

Anything else we need to know? 💬

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions