Summary: | REGRESSION (iOS 8): <select> values are not properly updated in a form with multiple <select>s | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrew Hall <fatman> | ||||||
Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | ahmad.saleem792, akeerthi, code, kenny.fung, miket, prlyons, webkit-bug-importer, webkit, wickedjack, xslade | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari 9 | ||||||||
Hardware: | iPhone / iPad | ||||||||
OS: | iOS 9.2 | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=216077 | ||||||||
Attachments: |
|
Description
Andrew Hall
2014-09-24 07:50:43 PDT
I can recreate this in iOS 9. Would you increase the priority of this issue? I find the following to be a better solution provided that you are not making use of disabling selects in your application (though obviously one could alter the code below to account for that as well): var selects = $('select'); if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { selects.blur(function() { selects.prop('disabled', false); }).focus(function() { selects.not(this).prop('disabled', true); }); } I'd like to point out that this has been open for over a year and has yet to be either acknowledged or fixed. The code causing this bug *must* be extremely sloppy, something to the effect of "set whichever select box is focused to the index of the picked option" and not the sane "set the select box *associated with this option* to the option's index". I'm glad the iPad/iPhone is getting thinner and all... great; lets see some improvement on the software side of this 100bn+ empire. In fact my solution did *not* work. We've instead used this: if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { selects.blur(function() { selects.css('display', ''); }).focus(function() { selects.not(this).css('display', 'none'); }); } This prevents any possibility that the user can tap another select until after completing their current selection. While painful, as there has been no official attention to this user I suppose it will have to do. +1 please fix Created attachment 271727 [details]
Testcase demonstrating the problem
Created attachment 271728 [details]
Screenshot showing the problem
Still reproduces in iOS 9.2.1
Here are a testcase and screenshot to clarify.
Still experiencing this bug in iOS 10. Still experiencing this bug in iOS 13. A side effect is that when the display switches to the first option, a change event is sent, as though the user had committed a change to the first element. If the user closes the dropdown without changing their selection, another change event is sent. I created this issue before finding this one for ios 13 I've seen production errors with this exact bug https://bugs.webkit.org/show_bug.cgi?id=216077 Has link to codepen demonstrating the problem. |