diff --git a/common/changes/@uifabric/utilities/tagpicker-ie_2018-08-16-20-30.json b/common/changes/@uifabric/utilities/tagpicker-ie_2018-08-16-20-30.json new file mode 100644 index 0000000000000..7ca2e2edae97d --- /dev/null +++ b/common/changes/@uifabric/utilities/tagpicker-ie_2018-08-16-20-30.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "packageName": "@uifabric/utilities", + "type": "none" + } + ], + "packageName": "@uifabric/utilities", + "email": "kakje@microsoft.com" +} \ No newline at end of file diff --git a/common/changes/office-ui-fabric-react/tagpicker-ie_2018-08-16-20-30.json b/common/changes/office-ui-fabric-react/tagpicker-ie_2018-08-16-20-30.json new file mode 100644 index 0000000000000..9620a02bf6dce --- /dev/null +++ b/common/changes/office-ui-fabric-react/tagpicker-ie_2018-08-16-20-30.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Autofill: prevent onInputChange from being called on IE11 inputs with a placeholder", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "kakje@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Autofill/Autofill.tsx b/packages/office-ui-fabric-react/src/components/Autofill/Autofill.tsx index a092eb552ced1..277bdb3a1176b 100644 --- a/packages/office-ui-fabric-react/src/components/Autofill/Autofill.tsx +++ b/packages/office-ui-fabric-react/src/components/Autofill/Autofill.tsx @@ -254,6 +254,11 @@ export class Autofill extends BaseComponent impl * @param newValue The new value from the input */ private _updateValue = (newValue: string) => { + // Only proceed if the value is nonempty and is different from the old value + // This is to work around the fact that, in IE 11, inputs with a placeholder fire an onInput event on focus + if (!newValue && newValue === this._value) { + return; + } this._value = this.props.onInputChange ? this.props.onInputChange(newValue) : newValue; this.setState( { diff --git a/packages/utilities/src/Customizer.tsx b/packages/utilities/src/Customizer.tsx index d09c0e6533c07..e176ef18cdfe4 100644 --- a/packages/utilities/src/Customizer.tsx +++ b/packages/utilities/src/Customizer.tsx @@ -74,8 +74,7 @@ export class Customizer extends BaseComponent; - } = - Customizer.contextTypes; + } = Customizer.contextTypes; // tslint:disable-next-line:no-any constructor(props: ICustomizerProps, context: any) {