Commit 1bfb6d1
committed
fix(fxa-settings): Preserve URL hash in query-fix.js for iOS WKWebView
Because:
- On iOS WKWebView, window.location.hash is empty when inline scripts
run early in the page lifecycle
- query-fix.js calls replaceState to re-encode query params (e.g. + to %2B)
and was appending window.location.hash which was empty in WKWebView
- This stripped the #channel_id and #channel_key fragment needed by the
pairing supplicant flow, causing "Invalid pairing configuration"
This commit:
- Falls back to parsing the hash from window.location.href when
window.location.hash is empty1 parent 11a364e commit 1bfb6d1
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
0 commit comments