fix aktions scroll fokus
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user