Strange behavior on Facebook page?

Okay, so I go to the facebook login page.

Here.

If you are already signed up with FB, then you login at the top. If you want to sign up for FB, you do that in the lower section.

Okay, focus on the “new password” field in this lower section.

So: when I right-click to reload the page, every second time, the password field shows a row of dots, as if a password had been entered.

Is the page just dot-ifying the words “new password?” Or what?

That would be my guess. I’ve never looked into the details of dot-ifying. I assume the code for the web page is giving a cue to the web browser. But now I’m curious.

Hopefully someone will explain it, so I don’t have to look it up myself. :slight_smile:

Never looked at anything like that before, but now I just did. Looking at the page source (Control-U in most browsers, maybe Command-U for Apple), one can see that the text “New Password” is the default value for the field. And the number of dots is just the same as the length of the text “New Password” – So there’s that clue.

Normally a password field would never show visible text. And note that when you start typing into the field, the text “New Password” disappears and dots begin to appear. I tried this with JavaScript disabled, and guess what: The text “New Password” remained there even after I started typing, and the dots appeared on top of that. And if you backspace to erase all your dots (with JavaScript enabled), as soon as the field is empty and you move to another field, the text “New Password” re-appears.

To the best of my knowledge, most of that is NOT the normal behavior of any browser. Rather, it is all controlled by JavaScript code written by some programmer at Facebook and incorporated into the page. Thus, it can behave any way said programmer happened to code it. In general, this is a bad idea (especially if said programmer overdoes it), because it causes pages to behave an whatever non-standard and unexpected way the programmer wrote it.

Yahoo, for example, seems to have gone over the top with their JavaScript programming, to the point where nothing behaves like one usually expects, and everything is terribly slow.