WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
245123
REGRESSION (?) (iOS 16): Form element stealing focus without user input
https://bugs.webkit.org/show_bug.cgi?id=245123
Summary
REGRESSION (?) (iOS 16): Form element stealing focus without user input
webkit
Reported
2022-09-13 00:47:02 PDT
Created
attachment 462307
[details]
Image showing an autofocus'd form element that results in the keyboard being displayed. Users on iOS16 have reported that Safari is now autofocusing on a form field when a page loads. I do not have any autofocus JS in the page... and I also do not possess any Apple device so cannot verify the claim (also cannot provide Safari version... but "whatever is the latest safari after iOS16 upgrade" is the Safari version). Example of bug report: "Minor bug but in iOS 16 Safari, the number input in the pagination captures focus on page load, so whenever you arrive at a forum list page the keyboard is launched." and the attached image by the user who reported that shows focus given to the keyboard. Background: I run a website with a pagination capability, here is a public example:
https://www.lfgss.com/microcosms/509/
The HTML for the pagination renders this form: ``` Page <form name="paginationByOffset" method="GET" data-initial="1" data-limit="25" data-max="391"> <input type="text" min="1" value="1" max="391" step="1" pattern="\d*" title="Enter the page number to jump to" class="form-control" /> <input name="offset" type="hidden" /> </form> of 391 ``` Some JavaScript does exist to process this when the form is submitted, i.e. go into the form, change the number, hit enter... ``` //////////////////// // pagination // //////////////////// (function(){ $('form[name=paginationByOffset]').submit(function(e){ console.log("Page jump requested") var self = $(this), initial = self.attr('data-initial'), limit = self.attr('data-limit'), max = self.attr('data-max'), value = parseInt(self.find('input[type=text]').val()), hidden = self.find('input[name=offset]'); console.log("limit = " + limit + " , max = " + max + " , value = " + value); if (!isNaN(value) && value >= 1 && value <= max && value != initial) { console.log("Jump") if (limit && value){ hidden.val(limit * (value-1)); } } else { console.log("Cancel jump") e.preventDefault(); } }); $('form[name=paginationByOffset] > input[type=text]').blur(function() { $(this).parent().submit(); }); })(); ``` It is claimed that on iOS16 *only* that this will autofocus.
Attachments
Image showing an autofocus'd form element that results in the keyboard being displayed.
(442.72 KB, image/png)
2022-09-13 00:47 PDT
,
webkit
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
webkit
Comment 1
2022-09-13 00:54:43 PDT
I know nothing and this is hypothesis... but is it suspect that code that affects focus triggering was recently changed?
https://github.com/WebKit/WebKit/pull/2907
webkit
Comment 2
2022-09-13 08:23:01 PDT
Found someone with an iOS 16 iPhone... they have *not* been able to reproduce this. I've asked for more info from the people who originally reported it to me.
Radar WebKit Bug Importer
Comment 3
2022-09-13 11:36:49 PDT
<
rdar://problem/99881328
>
Aditya Keerthi
Comment 4
2022-09-13 13:04:41 PDT
(In reply to webkit from
comment #2
)
> Found someone with an iOS 16 iPhone... they have *not* been able to > reproduce this. > > I've asked for more info from the people who originally reported it to me.
I am also unable to reproduce this issue on iOS 16, visiting
https://www.lfgss.com/microcosms/509/
. Please let us know if you hear back with additional information from the original reporter(s).
Aditya Keerthi
Comment 5
2022-09-13 13:05:39 PDT
(In reply to webkit from
comment #1
)
> I know nothing and this is hypothesis... but is it suspect that code that > affects focus triggering was recently changed? >
https://github.com/WebKit/WebKit/pull/2907
This change is not in iOS 16.
webkit
Comment 6
2022-09-14 00:54:30 PDT
Apparently it's reproducible. The video of this is 1.6MB which is too large as an attachment so I have uploaded it to here
https://david.kitchen/webkit245123/
and it is viewable at the URL here
https://david.kitchen/webkit245123/Video.mov
The only thing that stands out is that the Spanish language is default. Aside from that my understanding is that this is a standard iOS 16 iPhone. The person who recorded the video is not a technical user or engineer, but I have asked him if he's comfortable with my sharing his email and him working with you directly to try and identify whether this is an issue with the browser. As soon as he replies to that I shall update this ticket.
webkit
Comment 7
2022-09-14 01:19:07 PDT
The user who can reproduce the issue is happy to help debug. Contact: <
ben@beseku.com
> Unclear to me how to add his email to the CC list of this.
Ahmad Saleem
Comment 8
2022-09-14 04:03:58 PDT
(In reply to webkit from
comment #7
)
> The user who can reproduce the issue is happy to help debug. > > Contact: <
ben@beseku.com
> > > Unclear to me how to add his email to the CC list of this.
We can only them in CC, if they create an account on bugs.webkit.org and then they can comment and keep themselves updated on the bug progress as well.
Aditya Keerthi
Comment 9
2022-09-14 10:52:37 PDT
(In reply to webkit from
comment #6
)
> Apparently it's reproducible. > > The video of this is 1.6MB which is too large as an attachment so I have > uploaded it to here
https://david.kitchen/webkit245123/
and it is viewable > at the URL here
https://david.kitchen/webkit245123/Video.mov
> > The only thing that stands out is that the Spanish language is default. > Aside from that my understanding is that this is a standard iOS 16 iPhone. > > The person who recorded the video is not a technical user or engineer, but I > have asked him if he's comfortable with my sharing his email and him working > with you directly to try and identify whether this is an issue with the > browser. As soon as he replies to that I shall update this ticket.
Thank for the video, and for reaching out to the user. In the video, I observed that there are some extensions installed. It would be useful to know what extensions are installed, as that could be one reason why I am unable to reproduce.
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