Bug 18900 - Password field has focus but can't type text (i.rememberthemilk.com)
Summary: Password field has focus but can't type text (i.rememberthemilk.com)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://i.rememberthemilk.com/
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-05-05 16:18 PDT by David Kilzer (:ddkilzer)
Modified: 2008-05-24 17:35 PDT (History)
2 users (show)

See Also:


Attachments
possible reduction (245 bytes, text/html)
2008-05-06 06:44 PDT, Marcus
no flags Details
Proposed patch, minus new layout test (693 bytes, patch)
2008-05-06 17:21 PDT, Aaron Golden
no flags Details | Formatted Diff | Diff
Patch v2 (4.41 KB, patch)
2008-05-07 04:02 PDT, David Kilzer (:ddkilzer)
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2008-05-05 16:18:45 PDT
* SUMMARY
The password field on i.rememberthemilk.com gets focus, but the user can't type any text until they click in the field again.

* STEPS TO REPRODUCE
1. Launch Safari/WebKit.
2. Go to URL:  http://i.rememberthemilk.com/
3. Hit Tab.
4. Type a dummy username.
5. Hit Tab.
6. Type a dummy password.

* EXPECTED RESULTS
Typing in Step 6 should appear in the password field.

* ACTUAL RESULTS
Typing in Step 6 does nothing (even though the password field appears to have focus).

* REGRESSION
Unknown.  Only tested with Safari 3.1.1 on Mac OS X 10.5.x Leopard.

* NOTES
<rdar://problem/5912383>
Comment 1 Marcus 2008-05-06 06:44:47 PDT
Created attachment 20985 [details]
possible reduction
Comment 2 David Kilzer (:ddkilzer) 2008-05-06 06:53:22 PDT
(In reply to comment #0)
> * REGRESSION
> Unknown.  Only tested with Safari 3.1.1 on Mac OS X 10.5.x Leopard.

This is not a regression.  Safari 2.0.4 with original WebKit on Mac OS X 10.4.11 exhibits similar behavior.  WebKit nightly build r11976 exhibits the same behavior as ToT WebKit today (r32901).
Comment 3 David Kilzer (:ddkilzer) 2008-05-06 06:55:54 PDT
(In reply to comment #1)
> Created an attachment (id=20985) [edit]
> possible reduction

Great reduction, Marcus!  Thanks!

Comment 4 Aaron Golden 2008-05-06 17:21:20 PDT
Created attachment 20991 [details]
Proposed patch, minus new layout test

The patch makes HTMLInputElement handle the edge case where the document is changing the type of the focused node.  The node needs to update its selection range after reattaching.
Comment 5 Adele Peterson 2008-05-06 17:49:49 PDT
Comment on attachment 20991 [details]
Proposed patch, minus new layout test

instead of setting the selection range directly, it might be better to call updateFocusAppearance with the right value for restorePreviousSelection
Comment 6 David Kilzer (:ddkilzer) 2008-05-07 04:02:30 PDT
Created attachment 21000 [details]
Patch v2

Patch with layout test and changelogs.

All existing layout tests pass with this change.
Comment 7 David Kilzer (:ddkilzer) 2008-05-07 10:15:47 PDT
Committed revision 32959.

Comment 8 David Kilzer (:ddkilzer) 2008-05-24 17:35:23 PDT
In the original page, the <input> element that held the password would change from type="text" to type="password" using an onfocus event.

This bug is fixed for the original page.

The new page uses two <input> tags, and changes their CSS class to make then hidden or visible.  It works with mouse clicks, but fails with tabs.  This seems to be a server-side issue that it doesn't do the same thing with tabbed focus as with mouse clicks.