Skip to content

Commit 4bbd1fd

Browse files
authored
fix(PasswordBox): Override platform defaults for MinWidth and MinHeight (microsoft#1510) (microsoft#1513)
The default `MinWidth` and `MinHeight` for TextBox is 64 x 32. Overriding these values in the `SetDimensions` method to ensure the `TextBox` abides by the layout specified by Yoga. This is reasonably safe because Yoga has it's own implementation of `minWidth` and `minHeight`. Fixes microsoft#1369
1 parent 2812a45 commit 4bbd1fd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ReactWindows/ReactNative/Views/TextInput/ReactPasswordBoxManager.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,9 @@ public override void OnDropViewInstance(ThemedReactContext reactContext, Passwor
399399
/// <param name="dimensions">The output buffer.</param>
400400
public override void SetDimensions(PasswordBox view, Dimensions dimensions)
401401
{
402-
Canvas.SetLeft(view, dimensions.X);
403-
Canvas.SetTop(view, dimensions.Y);
404-
view.Width = dimensions.Width;
405-
view.Height = dimensions.Height;
402+
base.SetDimensions(view, dimensions);
403+
view.MinWidth = dimensions.Width;
404+
view.MinHeight = dimensions.Height;
406405
}
407406

408407
private void OnPasswordChanged(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)