Skip to content

Commit e32d708

Browse files
author
Marco Cesarato
committed
fix: android samunsung keyboard for floating numbers
1 parent b861983 commit e32d708

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/InputSpinner.js

+17-3
Original file line numberDiff line numberDiff line change
@@ -859,15 +859,28 @@ class InputSpinner extends Component {
859859
*/
860860
_getKeyboardType() {
861861
// Keyboard type
862-
let keyboardType = "numeric";
862+
let keyboardType = "number-pad";
863863
if (this.isTypeDecimal()) {
864864
keyboardType = "decimal-pad";
865-
} else {
866-
keyboardType = "number-pad";
867865
}
868866
return keyboardType;
869867
}
870868

869+
/**
870+
* Get auto capitalize
871+
* @returns {string}
872+
* @private
873+
*/
874+
_getAutoCapitalize() {
875+
let autoCapitalize = this.props.autoCapitalize
876+
? this.props.autoCapitalize
877+
: "none";
878+
if (this.isTypeDecimal()) {
879+
autoCapitalize = "words";
880+
}
881+
return autoCapitalize;
882+
}
883+
871884
/**
872885
* Get main color
873886
* @returns {String|*}
@@ -1309,6 +1322,7 @@ class InputSpinner extends Component {
13091322
returnKeyType={this.props.returnKeyType}
13101323
returnKeyLabel={this.props.returnKeyLabel}
13111324
autofocus={this.props.autofocus}
1325+
autoCapitalize={this._getAutoCapitalize()} // Bug fix for Samsung Keyboard
13121326
editable={this.isEditable()}
13131327
maxLength={this.props.maxLength}
13141328
onKeyPress={this.onKeyPress.bind(this)}

0 commit comments

Comments
 (0)