[Webkit-unassigned] [Bug 16812] New: onFocus causes cursor to be in wrong location if MobileSafari resizes page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 9 20:44:35 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16812

           Summary: onFocus causes cursor to be in wrong location if
                    MobileSafari resizes page
           Product: WebKit
           Version: 420+
          Platform: Other
               URL: http://www.whiterose.org/test/onfocusissue.html
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mcroft at mac.com


[If you're not looking for/at MobileSafari bugs here, my apologies.  If you
are, might be worthwhile to add platform/OS for it...]

OS iPhone 3B48b (1.1.2) 

This page uses onfocus to clear an example value in a text input field.  This
works fine in Safari (and other browsers) but causes a focus problem in Mobile
Safari (in portrait orientation).  The key code is 
input type="text" name="IphoneNumber" value="ex. 5125551212"
onfocus="this.value=''"

If I take out onfocus, this works fine.

We were unable to duplicate the problem with iPhone software 1.0.2

Steps to reproduce:
1: open the attached page in portrait mode on an iPhone
2: touch the text field
expected results: the field becomes blank and the cursor moves to the first
character in the field.
actual results: the cursor and the focus are somewhere before the field. 
Typing can happen, but it's not in the right field.

I've tried this with different doctypes and with and without the viewport meta
setting.  The page validates.  There is no problem if the form is the first
item on the page or if the iPhone is in landscape mode (no scaling happens). 
The H1 element is involved, if only because of the width of the page.  If the
scaling has already occurred (such as if you re-open the page while it's
already the right size for the form), the focus goes to the right place.

Reduction at the URL listed.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list