Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagpicker ie #5962

Merged
merged 5 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "",
"packageName": "@uifabric/utilities",
"type": "none"
}
],
"packageName": "@uifabric/utilities",
"email": "kakje@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ export class Autofill extends BaseComponent<IAutofillProps, IAutofillState> 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(
{
Expand Down
3 changes: 1 addition & 2 deletions packages/utilities/src/Customizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ export class Customizer extends BaseComponent<ICustomizerProps, ICustomizerConte

public static childContextTypes: {
customizations: PropTypes.Requireable<{}>;
} =
Customizer.contextTypes;
} = Customizer.contextTypes;

// tslint:disable-next-line:no-any
constructor(props: ICustomizerProps, context: any) {
Expand Down