[Webkit-unassigned] [Bug 197240] New: WebCore::PaymentShippingOption::selected value is ignored
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 24 13:14:00 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=197240
Bug ID: 197240
Summary: WebCore::PaymentShippingOption::selected value is
ignored
Product: WebKit
Version: Safari 12
Hardware: iPhone / iPad
OS: iOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
Assignee: webkit-unassigned at lists.webkit.org
Reporter: duhamelantoine1995 at gmail.com
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/
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190424/4ed51e61/attachment-0001.html>
More information about the webkit-unassigned
mailing list