WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
16812
onFocus causes cursor to be in wrong location if MobileSafari resizes page
https://bugs.webkit.org/show_bug.cgi?id=16812
Summary
onFocus causes cursor to be in wrong location if MobileSafari resizes page
Michael Croft
Reported
2008-01-09 20:44:35 PST
[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.
Attachments
reduced test case
(674 bytes, text/html)
2008-01-09 20:46 PST
,
Michael Croft
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael Croft
Comment 1
2008-01-09 20:46:56 PST
Created
attachment 18360
[details]
reduced test case
Mark Rowe (bdash)
Comment 2
2008-01-09 20:48:24 PST
Bugs in Safari on the iPhone should be reported in Radar at
http://bugreport.apple.com/
. I'm going to migrate this bug to Radar and close this bug.
Mark Rowe (bdash)
Comment 3
2008-01-09 20:49:37 PST
<
rdar://problem/5680715
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug