[Rt-commit] rt branch, 4.0/webkit-admin-users-disable-autofill, created. rt-4.0.22-3-g40886ea

? sunnavy sunnavy at bestpractical.com
Wed Sep 17 17:46:53 EDT 2014


The branch, 4.0/webkit-admin-users-disable-autofill has been created
        at  40886eaacda03edf7ffc7902f38fbdd79545035c (commit)

- Log -----------------------------------------------------------------
commit 40886eaacda03edf7ffc7902f38fbdd79545035c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Sep 18 05:37:59 2014 +0800

    don't autofill username/password on user admin page for safari/chrome
    
    Safari autofills UserName and CurrentPass fields, Chrome autofills Gecos and CurrentPass instead.
    the autofilled values are wrong nearly all the time for admin users page.
    
    by putting dummy elements ahead, Safari and Chrome could be fooled to not fill the real fields we care

diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 190f348..5e295cd 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -62,6 +62,11 @@
 <td valign="top" class="boxcontainer">
 <&| /Widgets/TitleBox, title => loc('Identity') &>
 
+%# dummy elements to get safari/chrome not to autofill the real username/password fields
+%# a simple "display:none" style doesn't work for safari(works for chrome though)
+<input type="text" style="width: 0; height: 0; border: 0;" />
+<input type="password" style="width: 0; height: 0; border: 0;" />
+
 <table>
 <tr><td align="right">
 <&|/l&>Username</&>:

-----------------------------------------------------------------------


More information about the rt-commit mailing list