Skip to content

Commit a22c789

Browse files
Fixes #2437
1 parent 3cf1330 commit a22c789

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/OSPSuite.UI/Controls/InputBoxDialog.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public InputBoxDialog()
2525
InitializeComponent();
2626
InitializeResources();
2727
Load += onLoad;
28+
Shown += onShown;
2829
}
2930

3031
public override void InitializeResources()
@@ -73,7 +74,6 @@ private void onLoad(object sender, EventArgs e)
7374
cbInput.SelectionLength = cbInput.Text.Length;
7475
cbInput.EditValueChanging += validateInput;
7576
cbInput.EditValue = _defaultValue;
76-
cbInput.Focus();
7777
}
7878

7979
private void validateInput(object sender, ChangingEventArgs e)
@@ -98,5 +98,10 @@ protected override void OnValidationError(Control control, string error)
9898
_hasError = true;
9999
base.OnValidationError(control, error);
100100
}
101+
102+
private void onShown(object sender, EventArgs e)
103+
{
104+
cbInput.Focus();
105+
}
101106
}
102107
}

0 commit comments

Comments
 (0)