Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signup: Verticals Survey: Fix redirect-after-survey bug #1449

Merged
merged 1 commit into from
Dec 10, 2015

Conversation

sirbrillig
Copy link
Member

Fixes #1310

The redirect was happening because in some browsers (iOS Chrome, Mac OS Firefox)
the # href in the Card components was redirecting the user back to the
survey step after the click handler had moved on to the next signup step. The
# href is necessary to force the Card components to display as clickable.

This fixes the issue by calling preventDefault and stopPropagation in the
click handler.

Testing

  1. You'll first have to add a signup flow to access the survey component, or find one in the recent history (before Signup: Verticals Survey: Disable the Verticals Survey #1445 was merged). This may be done for you, depending on if checking out this branch works correctly.
  2. Visit http://calypso.localhost:3000/start/vert-site (or whatever your flow name is) using Mac OS Firefox.
  3. Make sure you're in the oneStep test by entering this into your console: localStorage.setItem( 'ABTests', "{'verticalSurvey_20151202':'oneStep'}" );. Then reload the page to make sure you see the survey.
  4. Click one of the choices.
  5. You should be redirected to the next step (themes) and stay there (previously you would be bounced back to the survey step)

Fixes #1310

The redirect was happening because in some browsers (iOS Chrome, Mac OS Firefox)
the `#` href in the `Card` components was redirecting the user back to the
survey step after the click handler had moved on to the next signup step. The
`#` href is necessary to force the `Card` components to display as clickable.

This fixes the issue by calling `preventDefault` and `stopPropagation` in the
click handler.
@sirbrillig sirbrillig added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. labels Dec 9, 2015
@sirbrillig sirbrillig self-assigned this Dec 9, 2015
@sirbrillig
Copy link
Member Author

ping @kwight for review

@kwight
Copy link
Contributor

kwight commented Dec 10, 2015

LGTM! 👍

@sirbrillig sirbrillig added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 10, 2015
sirbrillig added a commit that referenced this pull request Dec 10, 2015
Signup: Verticals Survey: Fix redirect-after-survey bug
@sirbrillig sirbrillig merged commit 63eaf0e into master Dec 10, 2015
@sirbrillig sirbrillig deleted the fix/verticals-steps branch December 10, 2015 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vertical Survey: final survey choice gets stuck in iOS Chrome
3 participants