Jump to content

Recommended Posts

Posted

Hi,

Is there anyway to prevent the browser from prompting to save the password?

I have a login and it has a limited time cookie set for say 1-2 hours and that's all I want. How do I prevent the browser from prompting the user to save credentials?

Thanks

Mark

Posted

Hi Delphi Developer,

Thanks for the quick reply as always. 

 

I thought some/ all browsers ignore autocomplete="off" with regard to password and username fields??

 

anyway, can you tell me where would I set that?

 

 
Regards
Mark
Posted

Hi,

 

Ok, can you try to use this approach?!:

 

In your password edit box:

 

1. P1 -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    var me=sender.inputEl;      
    me.set({
        readonly: "readonly"
    });
}  

2. P1 -> ClientEvents -> ExtEvents -> function focus:

function focus(sender, e, eOpts)
{
    var me=sender.inputEl;    
    me.el.dom.removeAttribute('readonly');
}

Best regards.

Posted

I also need this, but component tuniMEdit does not have afterrender event

 

 

I tried the initialize event, but to no avail.

Another thing I noticed is that in the last version 1381, when I enter the value # in the passwordchar property,loading already shows a point in the field, as if I have already been informed, the password field does not show empty

post-2749-0-87723300-1489781470_thumb.png

Posted

Hi,

 

 

I also need this, but component tuniMEdit does not have afterrender event

 

 

For mobile you can use painted client event instead of afterrender

Posted

Hi Delphi Developer,

 

Hi,

 

Ok, can you try to use this approach?!:

 

In your password edit box:

 

1. P1 -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    var me=sender.inputEl;      
    me.set({
        readonly: "readonly"
    });
}  

2. P1 -> ClientEvents -> ExtEvents -> function focus:

function focus(sender, e, eOpts)
{
    var me=sender.inputEl;    
    me.el.dom.removeAttribute('readonly');
}

Best regards.

 

This is why you are The Delphi Developer!

Fantastic, thanks a lot.

Mark

  • 1 year later...
Posted

Hi,

 

Ok, can you try to use this approach?!:

 

In your password edit box:

 

1. P1 -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    var me=sender.inputEl;      
    me.set({
        readonly: "readonly"
    });
}  

2. P1 -> ClientEvents -> ExtEvents -> function focus:

function focus(sender, e, eOpts)
{
    var me=sender.inputEl;    
    me.el.dom.removeAttribute('readonly');
}

Best regards.

 

I added the snippet that you suggested to my two uniedits (login and password) in my login form and it worked.
However I have another form that I use the passwordchar and in this screen does not work, I tried to add the events also in the uniedit of this other form but it did not work, but if I remove the passwordchar it works
Would you have any tips to give me?
 
  • 1 month later...
Posted

Not work with 1463.

Ver.1463 has not ClientEvents -> ExtEvents -> function focus:

 

MySolution is:

  Pass:= EDT_Pass.Text;
   EDT_Pass.Text:= '';
   EDT_Pass.PasswordChar:= #0;
   ModalResult:=mrOK;
  • Upvote 1
Posted

 

Not work with 1463.

Ver.1463 has not ClientEvents -> ExtEvents -> function focus:

 

MySolution is:

  Pass:= EDT_Pass.Text;
   EDT_Pass.Text:= '';
   EDT_Pass.PasswordChar:= #0;
   ModalResult:=mrOK;

 

 

Nice FreeMan35

+1

  • 1 month later...
Posted

hello

i can' t find

2. P1 -> ClientEvents -> ExtEvents -> function focus:

on tunitextbox/tunidbtextbox

 

unigui ver 1472

delphi xe7

  • 2 months later...
Posted
On ‎6‎/‎3‎/‎2018 at 12:46 PM, Freeman35 said:

Not work with 1463.

Ver.1463 has not ClientEvents -> ExtEvents -> function focus:

 

MySolution is:


  Pass:= EDT_Pass.Text;
   EDT_Pass.Text:= '';
   EDT_Pass.PasswordChar:= #0;
   ModalResult:=mrOK;

 

 

Now,  focus exists  in Build 1480.

 

Thx to Sherzod

http://forums.unigui.com/index.php?/topic/10041-google-chrome-autofill-incorrectly-fill-all-password-related-edits-on-different-forms-with-same-text/&do=findComment&comment=52280

  • 2 years later...
Posted

has not ClientEvents -> ExtEvents -> function focus:

 

Solution:

ClientEvents -> ExtEvents ->

function afterrender(sender, eOpts)
{
var me=sender.inputEl;      
    me.set({
        readonly: "readonly"
    });
    
    sender.addListener(
        'focus',
        function(sender, e, eOpts) {
            me.el.dom.removeAttribute('readonly');
        }
    );
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...