Commit 1a91916
committed
fix(embed): honor redirect URL after submit + keep the success message themed
- The `redirectUrl` setting was never applied — on submit the embed now redirects
to it (window.location.href) when set, otherwise shows the success message.
- The success message was appended after the themed <form> was cleared, losing the
theme. It's now wrapped in .sfb-form with the resolved --sfb-* vars re-applied, so
it stays styled (notably on third-party embeds where there's no card to inherit
from). Small padding tweak on .sfb-success.
Verified end-to-end: a cross-origin embed auto-submits and navigates to the redirect.1 parent 9d3c2d9 commit 1a91916
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
228 | 239 | | |
229 | 240 | | |
230 | 241 | | |
| 242 | + | |
231 | 243 | | |
232 | | - | |
| 244 | + | |
233 | 245 | | |
234 | 246 | | |
235 | 247 | | |
| |||
0 commit comments