Fix focusing and clipboard use
This commit is contained in:
@@ -29,6 +29,7 @@ using SixLabors.ImageSharp.Processing;
|
|||||||
using System.Reflection.Metadata.Ecma335;
|
using System.Reflection.Metadata.Ecma335;
|
||||||
using Docnet.Core.Readers;
|
using Docnet.Core.Readers;
|
||||||
using MigraDoc.DocumentObjectModel.Visitors;
|
using MigraDoc.DocumentObjectModel.Visitors;
|
||||||
|
using Avalonia.Input.Platform;
|
||||||
|
|
||||||
namespace MayShow.ViewModels;
|
namespace MayShow.ViewModels;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public partial class MainView : UserControl
|
|||||||
public void UnfocusTextbox()
|
public void UnfocusTextbox()
|
||||||
{
|
{
|
||||||
var topLevel = TopLevel.GetTopLevel(this);
|
var topLevel = TopLevel.GetTopLevel(this);
|
||||||
topLevel?.FocusManager?.ClearFocus();
|
topLevel?.FocusManager?.Focus(null);
|
||||||
if (DataContext is MainViewModel mvm)
|
if (DataContext is MainViewModel mvm)
|
||||||
{
|
{
|
||||||
mvm?.HasUnsavedWork = true;
|
mvm?.HasUnsavedWork = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user