Chrome auto-filling the username/password in my application - javascript

I have an application, within which a user creates login details for various sub-users.
When I navigate to any such form for creating a new user, Chrome by default fills the username and password for currently logged-in user in to the form.
I thought Chrome might be picking these fields based on their id or name (which were earlier id=username and id=password respectively). However, even after changing these id and name, Chrome fills the field in the form.
How and Why does Chrome do this. I have been through this
and few other links but could not fix this.
Any suggestions ?

This is because of browser history. try this and it will no longer be problem
Open the Chrome menu using the button on the far right of the browser
toolbar.
Choose the Settings menu option.
Click the Show advanced
settings… link located at the bottom of the page. In the “Passwords
and forms” section, click the Manage passwords link

Related

How to keep a hover effect by selecting a browser suggestion?

I have a WordPress + WooCommerce website and by hovering Login / Sign Up on the header it leads to open a dropdown box where you can enter login details or register. The kind of issue described below also occurs on official theme demo website, at https://xstore.8theme.com/
Now, if I click on "Username or email address" field, Google Chrome shows me an account suggestion based on previously saved accounts on this website. You could try by attempting to login with whatever credentials and if you save them on Chrome (even if wrong), the browser will suggest them to you from the next login attempt. If you just hover the suggestion, all the dropdown box disappears. I said, "just hover the suggestion", because actually you do not have time to click on it.
I suppose this is due to hover effect, in fact if you move the cursor out of the dropdown box, this last disappears, and so happens with the suggestion making it like it was out of the dropdown box.
You can watch a video of the issue at:
https://s.nimbusweb.me/share/3721505/q5vwlz9bho2yufufoiic
How could I solve that?
Thank you in advance,
Alberto
I've had this Problem many times with outdated versions of chrome.
Have you tried updating your browser?
Do you have the same issue in other browsers?
Running updated chrome, I have not experienced this issue on the Demo Page (https://xstore.8theme.com/)

Display a customized confirm box in angularjs when user leaves a page

My requirement is to display a customized confirm box when the user leaves a page without saving form data.
I used the window.onbeforeunload event it is displaying google chrome related predefined confirm box. When the user changes any form and trying to reload, tab close or route change I want to display a $mdDialog.confirm and asking user to leave the page or stay on the same page. How do I make one?
For security reasons, this cannot be done. You can find more details in the MDN page on the beforeunload event.
In the past, you could return a custom string that was displayed to the user, but these days even that is ignore. The best you can do is instruct the page to show the standard dialog that you already have. (And in some browsers and some scenarios, even that instruction may be ignored.)
An alternative is to include a button in the page for leaving the form. Although that still does not prevent users from navigating away from the page directly, if it is sufficiently visible, in many cases users are more likely to click that than navigating directly. It also serves as a passive reminder that the form needs explicit saving or cancelling (depending on your specific details, of course).

How can I allow scrolling of the background when the 'confirm' box pops up?

Using a Chrome extension in the browser, I allow the user to select a bunch of text to submit to the database. When the user hits enter, a confirm box pops up, but before the user hits 'OK' to submit, I want the user to be able to scroll in the background and double check everything that he's submitting. Is there anyway to make the background scroll while the confirm window is in focus?
You need to initialize the JQ dialog with modal set to false
Official doco on how it works is here: http://api.jqueryui.com/dialog/#option-modal
Provided that the text/fields/data to be submitted isn't huge, you should also consider jasonscript's idea of presenting the data in the popup. From what you're saying though, it's more important to show what they might have MISSED, not just what they included. Perhaps an on the fly screenshot of the webpage at the point they opened the submission form? That would show their selection clearly.

IE11 and IFrame history object

We have an app with a list, that when a record is clicked a popup modal div is displayed, that is used to edit a user record. The div contains an iframe.
In the iframe, the user clicks save and the form is posted back, where server side validation occurs. If there is an error, the user is presented the error information and a go back button.
The go back button is wired to history.go(-1)
When it is clicked, in IE8/9/10 and Chrome, the iframe reverts back to the form with the user's changes still in it, allowing them to remedy any problems.
In IE11, it sends the parent page back to it's last page, so not only do you lose the div, but you lose the list.
Is there a way I can make IE11 behave like it was in IE10?
FWIW, we do perform basic client validation, such as checking for valid emails, mandatory fields etc, but we also do this in the backend, as well as checking that more complex rules to do with business relationships etc.
Thanks!
With IE11 finally going HTML5, you can save your history state so you would use push and popstate. Using this, you'll be able to control your "back" (working fine here).

Showing message box when user tries to navigate to another page in ASP.net

I have several pages in my ASP.Net application and several Hyperlinks in pages.
Is there anyway I can alert users if he/she tries to navigate without saving data?
Please help
Take a look at the JavaScript onbeforeunload event.
As a user fills in form fields, upon blur from any of the fields, set a HasData variable to true. Using the Onbeforeuload event, you can check to see if HasData is true. If so, you can prompt the user to confirm that they want to leave without saving.

Categories