Skip to content

Commit

Permalink
Autofill: Inherit font-family to prevent defaulting to Arial (microso…
Browse files Browse the repository at this point in the history
…ft#17507)

* Autofill: Inherit font-family to prevent defaulting to Arial.

* Change files

* Updating snapshots.
  • Loading branch information
khmakoto authored and joshualamusga1 committed Mar 25, 2021
1 parent ee96118 commit 6249ddf
Show file tree
Hide file tree
Showing 30 changed files with 216 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Autofill: Inherit font-family to prevent defaulting to Arial.",
"packageName": "@fluentui/react-examples",
"email": "Humberto.Morimoto@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Updating snapshots.",
"packageName": "@fluentui/react-experiments",
"email": "Humberto.Morimoto@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Autofill: Inherit font-family to prevent defaulting to Arial.",
"packageName": "@fluentui/react",
"email": "Humberto.Morimoto@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ exports[`Component Examples renders Announced.SearchResults.Example.tsx correctl
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ exports[`Component Examples renders ComboBox.Basic.Example.tsx correctly 1`] = `
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option C"
/>
Expand Down Expand Up @@ -797,6 +802,11 @@ exports[`Component Examples renders ComboBox.Basic.Example.tsx correctly 1`] = `
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option C"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ exports[`Component Examples renders ComboBox.Controlled.Example.tsx correctly 1`
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option C"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ exports[`Component Examples renders ComboBox.ControlledMulti.Example.tsx correct
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option C, Option D"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ exports[`Component Examples renders ComboBox.CustomStyled.Example.tsx correctly
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Calibri"
/>
Expand Down Expand Up @@ -659,6 +664,11 @@ exports[`Component Examples renders ComboBox.CustomStyled.Example.tsx correctly
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Calibri"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ exports[`Component Examples renders ComboBox.ErrorHandling.Example.tsx correctly
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option B"
/>
Expand Down Expand Up @@ -605,6 +610,11 @@ exports[`Component Examples renders ComboBox.ErrorHandling.Example.tsx correctly
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value=""
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ exports[`Component Examples renders ComboBox.Toggles.Example.tsx correctly 1`] =
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value=""
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ exports[`Component Examples renders ComboBox.Virtualized.Example.tsx correctly 1
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="Option 547"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ exports[`Component Examples renders ExtendedPeoplePicker.Basic.Example.tsx corre
onKeyDown={[Function]}
onPaste={[Function]}
role="combobox"
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down Expand Up @@ -291,6 +296,11 @@ exports[`Component Examples renders ExtendedPeoplePicker.Basic.Example.tsx corre
onKeyDown={[Function]}
onPaste={[Function]}
role="combobox"
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ exports[`Component Examples renders ExtendedPeoplePicker.Controlled.Example.tsx
onKeyDown={[Function]}
onPaste={[Function]}
role="combobox"
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down Expand Up @@ -291,6 +296,11 @@ exports[`Component Examples renders ExtendedPeoplePicker.Controlled.Example.tsx
onKeyDown={[Function]}
onPaste={[Function]}
role="combobox"
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ exports[`Component Examples renders PeoplePicker.Compact.Example.tsx correctly 1
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ exports[`Component Examples renders PeoplePicker.Controlled.Example.tsx correctl
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ exports[`Component Examples renders PeoplePicker.LimitedSearch.Example.tsx corre
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ exports[`Component Examples renders PeoplePicker.List.Example.tsx correctly 1`]
onInput={[Function]}
onKeyDown={[Function]}
role="textbox"
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ exports[`Component Examples renders PeoplePicker.Normal.Example.tsx correctly 1`
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,11 @@ exports[`Component Examples renders PeoplePicker.PreselectedItems.Example.tsx co
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ exports[`Component Examples renders PeoplePicker.ProcessSelection.Example.tsx co
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ exports[`Component Examples renders TagPicker.Basic.Example.tsx correctly 1`] =
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down Expand Up @@ -337,6 +342,11 @@ exports[`Component Examples renders TagPicker.Basic.Example.tsx correctly 1`] =
onKeyDown={[Function]}
role="textbox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,11 @@ exports[`Pagination render comboBox Pagination correctly 1`] = `
onTouchStart={[Function]}
role="combobox"
spellCheck={false}
style={
Object {
"fontFamily": "inherit",
}
}
type="text"
value="1"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ exports[`UnifiedPeoplePicker renders correctly with no items 1`] = `
onInput={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down Expand Up @@ -879,6 +884,11 @@ exports[`UnifiedPeoplePicker renders correctly with selected and suggested items
onInput={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ exports[`UnifiedPicker renders correctly with no items 1`] = `
onInput={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down Expand Up @@ -263,6 +268,11 @@ exports[`UnifiedPicker renders correctly with selected and suggested items 1`] =
onInput={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
style={
Object {
"fontFamily": "inherit",
}
}
value=""
/>
</div>
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/Autofill/Autofill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ export class Autofill extends React.Component<IAutofillProps, IAutofillState> im

public render(): JSX.Element {
const nativeProps = getNativeProps<React.InputHTMLAttributes<HTMLInputElement>>(this.props, inputProperties);
const style = { ...this.props.style, fontFamily: 'inherit' };
return (
<input
autoCapitalize="off"
autoComplete="off"
aria-autocomplete={'both'}
{...nativeProps}
style={style}
ref={this._inputElement}
value={this._getDisplayValue()}
onCompositionStart={this._onCompositionStart}
Expand Down
Loading

0 comments on commit 6249ddf

Please sign in to comment.