NEW197240
WebCore::PaymentShippingOption::selected value is ignored
https://bugs.webkit.org/show_bug.cgi?id=197240
Summary WebCore::PaymentShippingOption::selected value is ignored
Antoine du Hamel
Reported 2019-04-24 13:14:00 PDT
According to https://www.w3.org/TR/payment-request/#paymentshippingoption-dictionary, setting the selected member to true indicates that this is the default selected PaymentShippingOption in a sequence. User agents SHOULD display this option by default in the user interface. It seems WebKit always pick up the first `PaymentShippingOption` in the sequence, and ignores the `selected` member. ```js const currency = 'USD'; const shippingOptions = [ { id: "fancy-postal", label: "Fancy postal service", amount: { currency, value: "100" }, }, { id: "basic-postal", label: "Default postal service", amount: { currency, value: "1.00" }, selected: true, }, { id: "free-postal", label: "Free postal service", amount: { currency, value: "0" }, }, ]; ``` In this example, `basic-postal` should be the default choice (which is the case on Chromium), but instead `fancy-postal` is selected by default. Demo available here: https://aduh95.github.io/payment-request-test/
Attachments
Radar WebKit Bug Importer
Comment 1 2019-04-24 20:35:38 PDT
Note You need to log in before you can comment on or make changes to this bug.