I just fixed what has apparently ( and sadly) been a longstanding bug in Community Credit having to do with logging in. In a nutshell, if you enter your username and password when logging in and hit enter, you will see the profile of Karl Shifflett. Sounds pretty crazy, eh? Don't get me wrong, Karl is a highly accomplished individual and I am happy to show off his profile to anybody who asks. Heck, I even nominated him for an MVP which he was just awarded, in fact. However, you shouldn't really see his profile as a result of trying to login. Although this bug is rather simple, it is pretty bad from a perception standpoint. It makes the site appear to be badly broken, IMHO. Since I am in the habit of clicking on the login button, it is something that I never encountered.
After chatting with Chris Williams, last night, he mentioned that if he types in his UserName and hits enter, he sees Karl's Profile. I tried it and sure enough I was able to reproduce it. At this point, I said to myself, the bad news is that this bug exists, but the good news is that I can reproduce it very easily.
What could cause such strange behavior you may be wondering? I know I was. Believe it or not, it had to do with the fact that if you hit enter when logging in, it doesn't trigger the Submit Button on the login control, but rather the Enter key must bubble up to the next active element, which in this case was the first Profile display icon. As a result, you see the profile of the first person in the list.
The solution was on the page, though, and was the post by Benazir Mandli which was essentially to set the default button on the form to the login button. Simple as that. Problem solved.
Page.Form.DefaultButton = btnSubmit.UniqueID;
It is nice to have such a bad bug fixed.