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>
</UserControl.Resources>
<ScrollViewer Height="570"
<ScrollViewer x:Name="DialogContentScrollViewer"
Height="570"
Padding="0 0 5 0"
VerticalScrollBarVisibility="Auto">
VerticalScrollBarVisibility="Auto"
Focusable="True">
<StackPanel>
<Border x:Name="NewOrExistingOrNoneTicketSelectionBorder">
<WrapPanel x:Name="NewOrExistingOrNoneTicketWrap"

View File

@@ -2719,6 +2719,23 @@ namespace FasdDesktopUi.Basics.UserControls
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)
{
if (!(sender is FrameworkElement fe)) return;
@@ -2728,6 +2745,12 @@ namespace FasdDesktopUi.Basics.UserControls
if (parentBorder != null)
cFocusInvoker.InvokeLostFocus(parentBorder, e);
if (ReferenceEquals(sender, TicketStatusCombobox))
{
_ = Dispatcher.BeginInvoke(new Action(RestoreDialogFocusAfterTicketActionSelection), System.Windows.Threading.DispatcherPriority.Input);
return;
}
DynamicStatusAdditionBorder?.Focus();
}