1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00
OpenSTF/res/app/components/stf/common-ui/enable-autofill
2016-01-19 23:08:33 +09:00
..
enable-autofill-directive.js Fix all res/ files with ESLint rules with 0 errors. 2016-01-19 23:08:33 +09:00
enable-autofill-spec.js Fix all res/ files with ESLint rules with 0 errors. 2016-01-19 23:08:33 +09:00
index.js Fixed autofill for HTTPS. 2015-01-06 18:35:23 +09:00
README.md Added native auto-fill support for URL input in Chrome. 2014-07-31 16:54:28 +09:00

enable-autofill

This directive enables autofill (HTML5 autocomplete) on the selected form.

Currently this is only needed in Chrome because autofill only works on form POST method.

Based on this.

Usage

<form enable-autofill action="about:blank">
	<input type="text" autocomplete="on">
</form>  

This will create the following DOM:

<iframe src="about:blank" name="_autofill" style="display:none">
<form method="post" action="about:blank" target="_autofill">
	<input type="text" autocomplete="on">
</form>  

Yes, it is a bit ugly but it is currently the only way.

It will create only one iframe which will be reused.