This will be displayed on your public profile
diff --git a/packages/mdc-textfield/icon/README.md b/packages/mdc-textfield/icon/README.md
index 617724ef8de..4d389eae731 100644
--- a/packages/mdc-textfield/icon/README.md
+++ b/packages/mdc-textfield/icon/README.md
@@ -64,28 +64,28 @@ Leading and trailing icons can be applied to default or `mdc-text-field--outline
In text field:
```html
-
+
```
In outlined text field:
```html
-
+
```
### Trailing icon
@@ -93,28 +93,28 @@ In outlined text field:
In text field:
```html
-
+
```
In outlined text field:
```html
-
+
```
### Leading and Trailing icons
@@ -122,30 +122,30 @@ In outlined text field:
In text field:
```html
-
+
```
In outlined text field:
```html
-
+
```
## Style Customization
diff --git a/packages/mdc-textfield/icon/foundation.ts b/packages/mdc-textfield/icon/foundation.ts
index fe75d5eff07..bbd98b047f5 100644
--- a/packages/mdc-textfield/icon/foundation.ts
+++ b/packages/mdc-textfield/icon/foundation.ts
@@ -104,6 +104,8 @@ export class MDCTextFieldIconFoundation extends MDCFoundation
{
const wrapper = document.createElement('div');
wrapper.innerHTML = `
-
+
`;
const el = wrapper.firstElementChild as HTMLElement;
wrapper.removeChild(el);
@@ -674,6 +674,22 @@ describe('MDCTextField', () => {
expect(lineRipple.setRippleCenter).toHaveBeenCalledWith(100);
});
+ it('should not focus input when clicking icon', () => {
+ const root = getFixture();
+ const icon = root.querySelector('.mdc-text-field__icon') as HTMLElement;
+ const component = new MDCTextField(root);
+ document.body.appendChild(root);
+ component.root_.click();
+ const input = (component as any).input_ as HTMLInputElement;
+ expect(document.activeElement).toBe(input, 'input should be focused');
+ input.blur();
+ expect(document.activeElement).not.toBe(input, 'ensure input was blurred');
+ icon.click();
+ expect(document.activeElement)
+ .not.toBe(input, 'input should not be focused');
+ document.body.removeChild(root);
+ });
+
function setupMockFoundationTest(root = getFixture()) {
const mockFoundation = createMockFoundation(MDCTextFieldFoundation);
const component = new MDCTextField(root, mockFoundation);
diff --git a/test/screenshot/spec/mdc-rtl/variables/include.html b/test/screenshot/spec/mdc-rtl/variables/include.html
index 878e53375da..ae2de1190ff 100644
--- a/test/screenshot/spec/mdc-rtl/variables/include.html
+++ b/test/screenshot/spec/mdc-rtl/variables/include.html
@@ -59,16 +59,16 @@