fix aktions scroll fokus

This commit is contained in:
Meik
2026-02-09 19:48:11 +01:00
parent fe49708c2e
commit 820a6ad3f3
2 changed files with 28 additions and 3 deletions

View File

@@ -87,9 +87,11 @@
</Style> </Style>
</UserControl.Resources> </UserControl.Resources>
<ScrollViewer Height="570" <ScrollViewer x:Name="DialogContentScrollViewer"
Height="570"
Padding="0 0 5 0" Padding="0 0 5 0"
VerticalScrollBarVisibility="Auto"> VerticalScrollBarVisibility="Auto"
Focusable="True">
<StackPanel> <StackPanel>
<Border x:Name="NewOrExistingOrNoneTicketSelectionBorder"> <Border x:Name="NewOrExistingOrNoneTicketSelectionBorder">
<WrapPanel x:Name="NewOrExistingOrNoneTicketWrap" <WrapPanel x:Name="NewOrExistingOrNoneTicketWrap"

View File

@@ -2719,6 +2719,23 @@ namespace FasdDesktopUi.Basics.UserControls
cFocusInvoker.InvokeGotFocus(parentBorder, e); cFocusInvoker.InvokeGotFocus(parentBorder, e);
} }
private void RestoreDialogFocusAfterTicketActionSelection()
{
try
{
if (DialogContentScrollViewer == null)
return;
Keyboard.ClearFocus();
DialogContentScrollViewer.Focus();
Keyboard.Focus(DialogContentScrollViewer);
}
catch (Exception E)
{
LogException(E);
}
}
private void DropDownClosed(object sender, EventArgs e) private void DropDownClosed(object sender, EventArgs e)
{ {
if (!(sender is FrameworkElement fe)) return; if (!(sender is FrameworkElement fe)) return;
@@ -2728,6 +2745,12 @@ namespace FasdDesktopUi.Basics.UserControls
if (parentBorder != null) if (parentBorder != null)
cFocusInvoker.InvokeLostFocus(parentBorder, e); cFocusInvoker.InvokeLostFocus(parentBorder, e);
if (ReferenceEquals(sender, TicketStatusCombobox))
{
_ = Dispatcher.BeginInvoke(new Action(RestoreDialogFocusAfterTicketActionSelection), System.Windows.Threading.DispatcherPriority.Input);
return;
}
DynamicStatusAdditionBorder?.Focus(); DynamicStatusAdditionBorder?.Focus();
} }