-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
What's the issue?
AMP.setState doesn't update the select element on Safari.
How do we reproduce the issue?
Given a simple amp-selector
<amp-selector layout="container" on="select:AMP.setState({ selectedVariantState: { variantSku: event.targetOption, variantQuantity: 1 }})" [selected]="selectedVariantState.variantSku">
<amp-img src="image.gif" width="64" height="64" option="12345-12345"></amp-img>
//more images omitted for brevity
</amp-selector >
<select on="change:AMP.setState({ selectedVariantState: { variantSku: event.value, variantQuantity: 1 }})">
<option value="-1" selected="selectedVariantState.variantSku == ''">Select</option>
<optgroup label="Group Name">
<option [selected]="selectedVariantState.variantSku == '12345-12345'" value="12345-12345">
Some Value
</option>
</optgroup>
//more optgroups and options, omitted for brevity
</select>
What browsers are affected?
Mobile Safari
Which AMP version is affected?
All versions