-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
Description
Describe the bug
When dispatching input events in BrowserInputHandler, Thread.SynchronizationContext is not set, it is null.
This makes binding to observables break.
System.InvalidOperationException: TaskScheduler_FromCurrentSynchronizationContext_NoCurrent
at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
at System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext()
at Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings.TaskStreamPlugin`1[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start(WeakReference`1 reference)
at Avalonia.Data.Core.ExpressionNodes.StreamNode.OnSourceChanged(Object source, Exception dataValidationError)
at Avalonia.Data.Core.ExpressionNodes.ExpressionNode.SetSource(Object source, Exception dataValidationError)
To Reproduce
Create a browser app that binds to a task property and the property value is created as a response to input.
Expected behavior
The bound view is updated when the bound task or observable completes.
Avalonia version
11.3.9
OS
WebAssembly
Additional context
Reactions are currently unavailable