Jump to content

Browser promping save of Username, Passwords


MarkLince

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...

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?
 
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 months later...
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

Link to comment
Share on other sites

  • 2 years later...

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');
        }
    );
}

Link to comment
Share on other sites

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...