EasyUI Forum

General Category => Bug Report => Topic started by: jgautier on August 23, 2014, 08:33:24 AM



Title: Textbox browser's autofill
Post by: jgautier on August 23, 2014, 08:33:24 AM
Hi,

When I use textboxes inside my login forms, some browsers don't suggest to save/remember login and password as they do when I use standard textfields.
On MacOS, Firefox (30) works correctly, but Chrome (36.0.1985.143) don't, neither Safari (7).

thanks a lot for looking at this issue.

JG


Title: Re: Textbox browser's autofill
Post by: stworthy on August 24, 2014, 03:35:07 AM
The textbox input has autocomplete disabled. To enable it, please try this:
Code:
$('#tb').textbox('textbox').attr('autocomplete', 'on');


Title: Re: Textbox browser's autofill
Post by: jgautier on August 24, 2014, 09:56:24 AM
thanks for your answer, but I'm not sure that is the problem.

(my english is not very good, sorry...)

I talk about browser's autofill function : on a web page, when you fill some fields to login, the first time your browser asks you if you want it to keep and remember these values and automatically recover them next times. When you come back to the same page, form fields are automatically filled by the browser with stored values.

Since I use easyui textboxes in my login form, instead of standard html textfields, this function don't work correctly (using Chrome neither Safari on MacOS X).

Please tell me if I'm right or if I've misunderstood something.

thanks,

JG


Title: Re: Textbox browser's autofill
Post by: stworthy on August 25, 2014, 01:39:10 AM
The textbox component rewraps the input element. The auto filling feature may not work well in some browsers. The solution to solve your issue is to use the native input element instead, or wait a little time to create the textbox components.


Title: Re: Textbox browser's autofill
Post by: jgautier on August 25, 2014, 03:19:59 AM
All right, thanks.
But what do you mean by "or wait a little time to create the text box components" ?

JG


Title: Re: Textbox browser's autofill
Post by: stworthy on August 25, 2014, 06:16:04 AM
Suppose you have a form defined as:
Code:
<form action="test.php" method="post">
<div id="cc" style="display:none">
<input id="uid" name="uid" style="width:100px">
<input id="pwd" name="pwd" type="password" style="width:100px">
<input type="submit" value="Submit">
</div>
</form>
When the page is loaded successfully, delay creating the textbox components.
Code:
<script type="text/javascript">
$(function(){
setTimeout(function(){
$('#cc').show();
$('#uid,#pwd').textbox();
},1000)
})
</script>


Title: Re: Textbox browser's autofill
Post by: jgautier on August 27, 2014, 12:33:52 AM
Thanks : I've understood now.

JG


Title: Re: Textbox browser's autofill
Post by: jgautier on November 22, 2014, 06:36:56 AM
Hello,

I've tried to use delay, but it doesn't seem to work.

JG