| <input id="input" value="Springfield" placeholder="City"> |
| <script> |
| // There was an issue where the placeholder would be visible along with the |
| // autofilled value. To repro, the field has to have a placeholder and a value. |
| // Then set the suggested value to the same value and then autofill that value. |
| input.focus(); |
| internals.setSuggestedValue(input, 'Springfield'); |
| internals.setAutofilled(input, true); |
| // recalcStyle calls UpdatePlaceholderVisibility and shows the placeholder element |
| input.offsetWidth; // To force style recalc. |
| internals.setAutofilledValue(input, 'Springfield'); |
| input.style.width = '99px'; |
| </script> |