Reputation: 121
I have an input field :
<input type="password" name="password" id="password" autocomplete="on" required="" class="ui-state-valid">
When page initially loads and autocomplete hits, the $("#password").val() returns a "". Even when there is value inserted by the autocomplete.
This is causing issues with the custom placeholder.
I need to know why the value is blank. I have other input fields in the page which work fine with the autocomplete.
Upvotes: 3
Views: 927
Reputation: 3316
As of Internet Explorer11, the autocomplete property is no longer supported for input type=password fields.
The AutoComplete feature is highlighted in the Using AutoComplete in HTML Forms overview.
When AutoComplete is enabled, suggestions are provided for the value of a text field. Suggested values are mapped values based on the name attribute or vCard schema specified by the vcard_name attribute.
If AutoComplete is disabled, values are not stored and suggested values are not presented.
Values in input type=password elements can be mapped for AutoComplete; however, the ability to store this information can be disabled in the browser, and the user is prompted for a confirmation before the value is stored.
Information provided by the AutoComplete feature is not exposed to the object model, and is not visible to a Web page until the user selects one of the suggestions as a value for the text field.
ref :- here
Upvotes: 2