feat: focus dialog after showing modal
This commit is contained in:
@@ -173,6 +173,7 @@ public partial class OverlayDialogHost
|
||||
_modalCount++;
|
||||
IsInModalStatus = _modalCount > 0;
|
||||
control.IsClosed = false;
|
||||
control.Focus();
|
||||
}
|
||||
|
||||
// Handle dialog layer change event
|
||||
|
||||
@@ -67,6 +67,8 @@ public partial class OverlayDialogHost
|
||||
{
|
||||
await Task.WhenAll(animation.RunAsync(control), _maskAppearAnimation.RunAsync(mask));
|
||||
}
|
||||
|
||||
control.Focus();
|
||||
}
|
||||
|
||||
private void SetDrawerPosition(DrawerControlBase control)
|
||||
|
||||
@@ -20,6 +20,7 @@ public abstract class OverlayFeedbackElement: ContentControl
|
||||
|
||||
static OverlayFeedbackElement()
|
||||
{
|
||||
FocusableProperty.OverrideDefaultValue<OverlayFeedbackElement>(true);
|
||||
DataContextProperty.Changed.AddClassHandler<OverlayFeedbackElement, object?>((o, e) => o.OnDataContextChange(e));
|
||||
ClosedEvent.AddClassHandler<OverlayFeedbackElement>((o,e)=>o.OnClosed(e));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user