ampproject / ampproject/amphtml

amp-selector 1.0 renders nothing on playground and on chrome on iOS

Open
#37,047 2 comments 0 reactions 0 assignees View on GitHub
P3: When Possible Stale Type: Bug WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

I tried amp-selector 1.0 on the playground and it renders nothing on the screen, when I switch to version 0.1 it works and I can see the options on the screen.

The same code is working on my device (Linux) with chrome, but my teammate who has iOS only sees a white screen (just like in the playground).

### Reproduction Steps

I use these scripts :
```


```
and this simple code :

```


option 1

option 2

```

The result is a blank page.

Please look at this [playground](https://playground.amp.dev/?format=websites&_gl=1*1ui0nrr*_ga*YW1wLVg2T3hrazFBWW5YSjNnLUZzS0JnNUE.&mode=Responsive#share=PCFET0NUWVBFIGh0bWw+CjxodG1sIOKaoSBsYW5nPSJlbiI+CjxoZWFkPgogIDxtZXRhIGNoYXJzZXQ9InV0Zi04IiAvPgogIDx0aXRsZT5hbXAtc2VsZWN0b3I8L3RpdGxlPgogIDxsaW5rIHJlbD0iY2Fub25pY2FsIiBocmVmPSJodHRwczovL2FtcC5kZXYvZG9jdW1lbnRhdGlvbi9leGFtcGxlcy9jb21wb25lbnRzL2FtcC1zZWxlY3Rvci9pbmRleC5odG1sIiAvPgogIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgiIC8+CgogIDxzY3JpcHQgYXN5bmMgc3JjPSJodHRwczovL2Nkbi5hbXBwcm9qZWN0Lm9yZy92MC5qcyI+PC9zY3JpcHQ+CiAgPHNjcmlwdCBhc3luYyBjdXN0b20tZWxlbWVudD0iYW1wLXNlbGVjdG9yIiBzcmM9Imh0dHBzOi8vY2RuLmFtcHByb2plY3Qub3JnL3YwL2FtcC1zZWxlY3Rvci0xLjAuanMiPjwvc2NyaXB0PgoKCiAgPHN0eWxlIGFtcC1ib2lsZXJwbGF0ZT4KICAgICAgYm9keSB7CiAgICAgICAgLXdlYmtpdC1hbmltYXRpb246IC1hbXAtc3RhcnQgOHMgc3RlcHMoMSwgZW5kKSAwcyAxIG5vcm1hbCBib3RoOwogICAgICAgIC1tb3otYW5pbWF0aW9uOiAtYW1wLXN0YXJ0IDhzIHN0ZXBzKDEsIGVuZCkgMHMgMSBub3JtYWwgYm90aDsKICAgICAgICAtbXMtYW5pbWF0aW9uOiAtYW1wLXN0YXJ0IDhzIHN0ZXBzKDEsIGVuZCkgMHMgMSBub3JtYWwgYm90aDsKICAgICAgICBhbmltYXRpb246IC1hbXAtc3RhcnQgOHMgc3RlcHMoMSwgZW5kKSAwcyAxIG5vcm1hbCBib3RoOwogICAgICB9CiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyAtYW1wLXN0YXJ0IHsKICAgICAgICBmcm9tIHsKICAgICAgICAgIHZpc2liaWxpdHk6IGhpZGRlbjsKICAgICAgICB9CiAgICAgICAgdG8gewogICAgICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgQC1tb3ota2V5ZnJhbWVzIC1hbXAtc3RhcnQgewogICAgICAgIGZyb20gewogICAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgIH0KICAgICAgICB0byB7CiAgICAgICAgICB2aXNpYmlsaXR5OiB2aXNpYmxlOwogICAgICAgIH0KICAgICAgfQogICAgICBALW1zLWtleWZyYW1lcyAtYW1wLXN0YXJ0IHsKICAgICAgICBmcm9tIHsKICAgICAgICAgIHZpc2liaWxpdHk6IGhpZGRlbjsKICAgICAgICB9CiAgICAgICAgdG8gewogICAgICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgQC1vLWtleWZyYW1lcyAtYW1wLXN0YXJ0IHsKICAgICAgICBmcm9tIHsKICAgICAgICAgIHZpc2liaWxpdHk6IGhpZGRlbjsKICAgICAgICB9CiAgICAgICAgdG8gewogICAgICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgQGtleWZyYW1lcyAtYW1wLXN0YXJ0IHsKICAgICAgICBmcm9tIHsKICAgICAgICAgIHZpc2liaWxpdHk6IGhpZGRlbjsKICAgICAgICB9CiAgICAgICAgdG8gewogICAgICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZTsKICAgICAgICB9CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPG5vc2NyaXB0CiAgICAgID48c3R5bGUgYW1wLWJvaWxlcnBsYXRlPgogICAgICAgIGJvZHkgewogICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246IG5vbmU7CiAgICAgICAgICAtbW96LWFuaW1hdGlvbjogbm9uZTsKICAgICAgICAgIC1tcy1hbmltYXRpb246IG5vbmU7CiAgICAgICAgICBhbmltYXRpb246IG5vbmU7CiAgICAgICAgfQogICAgICA8L3N0eWxlPjwvbm9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+CiAgPGFtcC1zZWxlY3RvciBsYXlvdXQ9ImZpeGVkLWhlaWdodCIgaGVpZ2h0PSIyMDAiPgogICAgPGRpdiBvcHRpb249IjEiPm9wdGlvbiAxPC9kaXY+CiAgICA8ZGl2IG9wdGlvbj0iMiI+b3B0aW9uIDI8L2Rpdj4KICA8L2FtcC1zZWxlY3Rvcj4KPC9ib2R5Pgo8L2h0bWw+)

When you change the amp-selector script to the version 0.1 you should see correctly the options :
```

```

### Relevant Logs

_No response_

### Browser(s) Affected

Chrome

### OS(s) Affected

ios

### Device(s) Affected

_No response_

### AMP Version Affected

012111060251009

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the blank page in the linked AMP Playground using amp-selector-1.0.js, then compare it with amp-selector-0.1.js in Chrome on iOS. Inspect the amp-selector component entry point and its existing tests, if available, to identify the version-specific failure. Done means the supplied selector renders both options on the affected setup without regressing version 0.1 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.