[Webkit-unassigned] [Bug 137067] New: <select> value issue

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 24 07:50:43 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137067

           Summary: <select> value issue
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: iOS
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: fatman at phatman.co.uk


We have now discovered *another* iOS 8 issue on Safari with select/dropdown elements. In order to reproduce the issue, you need a form that contains multiple dropdowns

1)    Set the value of one drop downs to be 2nd item

2)    In another  dropdown, select the 3rd item, but do not click done

3)    Click back on the original <select> element from step 1.

4)    The 3rd item will be displayed as selected in the first element, not the 2nd as you set in step 1 – but in the selection box the correct value will be shown


When moving from one dropdown to another, it seems to set the index of the newly selected dropdown to the index of the dropdown that you have clicked away from.
You can fix this with jQuery by intercepting the change event and reselecting the correct value.

$('select').bind('focus', function () {
                    var curVal = $(this).get(0).selectedIndex;
                    window.setTimeout(function(){
                        $(this).get(0).selectedIndex = curVal;
                        $(this).click();
                    }.bind(this),50);
});

However, you need to be wary – this bug does call the change event of the select when incorrectly selecting the value

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


More information about the webkit-unassigned mailing list