File tree 1 file changed +10
-0
lines changed
src/components/hv-text-field
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,15 @@ const HvTextField = (props: HvComponentProps) => {
41
41
const textContentType =
42
42
( props . element . getAttribute ( 'text-content-type' ) as TextContextType ) ||
43
43
'none' ;
44
+ // Force email addresses to have no auto-capitalization, others use default
45
+ const defaultCapitalization =
46
+ keyboardType === 'email-address' ? 'none' : undefined ;
47
+ const autoCapitalize =
48
+ ( props . element . getAttribute ( 'auto-capitalize' ) as
49
+ | 'none'
50
+ | 'sentences'
51
+ | 'words'
52
+ | 'characters' ) || defaultCapitalization ;
44
53
45
54
// Handlers
46
55
const setFocus = ( focused : boolean ) => {
@@ -104,6 +113,7 @@ const HvTextField = (props: HvComponentProps) => {
104
113
props . options . registerInputHandler ( ref ) ;
105
114
}
106
115
} }
116
+ autoCapitalize = { autoCapitalize }
107
117
autoFocus = { autoFocus }
108
118
defaultValue = { defaultValue }
109
119
editable = { editable }
You can’t perform that action at this time.
0 commit comments