Closed Bug 191896 Opened 22 years ago Closed 22 years ago

No focus on username/password possible when launching mozilla from a shortcut and page rquires authentication

Categories

(Core :: Networking: HTTP, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: awilkins, Assigned: emaijala+moz)

References

Details

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 No focus on username/password possible when launching mozilla from a shortcut and page rquires authentication. Reproducible: Always Steps to Reproduce: 1. Create desktop shortcut to page requiring authentication 2. Ensure mozilla not running 3. Double click shortcut 4. Notice that it is not possible to enter username and password textboxes. Actual Results: Couldn't enter username/password. Clicking cancel and reload pops up the dialog again and allows entry of the username and password. Expected Results: Allow the username textbox to accept focus
WFM, trunk build 2003013008 WinXP.
I'm seeing this too. I'm using 1.3 final 20030312 Windows 2000 Also, starting from the command line gives this same issue, either with start http://intranet/ or mozilla.exe http://intranet/ A workaround is to give another application focus and then click back on Mozilla, but the bug is definitely there.
Blocks: 61681
Note there is no cursor in the "Username" field. Clicking on the username field should allow typing in it, but does not.
darin owns the blame for the caller in nsHttpChannel.cpp, someone will probably have to investigate this in a debugger, i agree with bz this is probably a danm bug. but that ere didn't see the problem isn't promising.
Assignee: asa → darin
Component: Browser-General → Networking: HTTP
QA Contact: asa → httpqa
Could you guys try it with a recent nightly build? Just in case it's related to the focus stuff redone after 1.3.
Attachment #118305 - Attachment is obsolete: true
Reproduced on 20030324 build Note: this problem has always been intermittent for me.
Attachment #118309 - Attachment is obsolete: true
I was finally able to reproduce and will take a look. It seems that, contrary to the report, I need to have Mozilla running before starting it again with an address.
Assignee: darin → ere
Status: UNCONFIRMED → NEW
Ever confirmed: true
It sounds like the two of you do agree this is a problem...
Sure, I wouldn't spend my time on it otherwise :)
Oh crap. The same problem as with bug 163372. A dialog gets the focus only if its owner had it (I believe). Now when a new browser window is created, it doesn't get focus until idle timers fire (navigator.js 587, 589). Idle timers won't fire before the dialog is displayed. Therefore, it doesn't get the focus. Verified by removing the setTimeout() from navigator.js. Going to ask around a bit.
And the real question I make is: why is setTimeout() used to set the focus? It's causing a lot of trouble because it's not predictable. Bryner? Jag? I've tried to get a picture of the deal from related bugs, but it's a mess :/
Unfortunately, setTimeout() is often used when setting focus to work around problems with xbl bindings not being fully loaded (and perhaps other problems with setting the focus during document load).
Oh crap, this all leads back to bug 90337.
Depends on: 90337
Attached patch timeout patchSplinter Review
Ere, can you see if this fixes the timeout issue without regressing anything?
Unfortunately Neil's patch didn't help, which means my thought was incorrect. I've now done some more research. The real problem seems to be that for some reason I've yet find out the dialog window doesn't receive SetFocus(true) which means that NS_ACTIVATE isn't dispatched either. Now the window doesn't seem to be active and dialog's commandDispatcher fails to move the focus.
Here's the deal: normally the dialog gets the focus when its parent is disabled in the beginning of ShowModal(). The problem here is that chrome for the dialog hasn't been loaded yet, which means the window is still invisible. This causes WM_SETFOCUS to be missed. When the window is finally shown, it will only receive WM_ACTIVATE, which is not dispatched as NS_ACTIVATE before WM_SETFOCUS is received and dispatched as NS_GOTFOCUS. Therefore chrome and all never find out that the window actually became active.
Synchronously loading the local chrome (as in bug 90337) would fix this. I'm looking into getting opinions on it.
I checked in a fix for bug 90337, but it seems it alone doesn't always make this work :( I'll investigate.
Looks like I had a selfmade bug in my tree. Let's wait for the nightlies to verify if this now works.
WFM, latest trunk build (2003041808) :)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: