blob: d41656e7c47d3a5d70977b50764174c09c385d2b [file] [log] [blame]
<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>