Change:
I'm testing beta. Describe the bug When submitting a challenge using Ctrl+Enter it automatically completes also the following challenge. To Reproduce Steps to reproduce the behavior: a logged out user to the first challenge it Ctrl+Enter marks as solved also the following challenge and you can go ahead Expected behavior It should solve the current challenge and present the following one. Screenshots As you can see I can submit multiple challenges: ! Desktop (please complete the following information): OS: Ubuntu Browser Firefox Version 69.0.1 Additional context I've been able to reproduce it on but I could skip only one challenge. On my local dev I managed to skip 4.
I've digged a bit on this issue, and I think the problem is somehow related to this line: As this is triggered also when I'm submitting the finished challenge. If I comment that line out everything works fine, meaning I can Ctrl+Enter to run the tests and submit and the bug disappear. I'm going to dig a bit more, but does that makes any sense to you?
Thanks for testing our beta version and reporting this! You rock. /cc
Thanks It looks like I didn't test the logged out behaviour. so, what do we want to happen for logged out users? The issue I see is that it currently says 'Submit and go to the next challenge', but clearly they can't submit. For now, do we just want them to see the same as logged in users (and quietly not submit)?
Here is what I would do: ! Of course the modal should close as well like you mentioned. The signin button can link to same as the home page CTA. And we could remove from the first button
Turns out it's not working properly even when the user is logged in. I think it's a race condition between and . was quite right, the problem is on that line. It shouldn't be called if the modal is open since it's listening to as well.
yes I think it's with the in the editor and the in the . I can give a further look later if you wish.
Thanks for the offer but I think (with your help!) I've fixed it. It seemed only fair, since I introduced the bug.
Excellent!
Release on its way, should be available within the hour.

Discussion:
const { children, navigate, isSignedIn, ...restProps } = props; return ( <Button <ins> bsStyle='default' className={(restProps.block ? 'btn-cta-big' : '') + ' signup-btn btn-cta'} </ins> href='/signin' onClick={createOnClick(navigate, isSignedIn)} {...restProps} <del> bsStyle='default' className={(restProps.block ? 'btn-cta-big' : '') + ' signup-btn btn-cta'} </del> > {children || 'Sign In'} </Button>

import { Button, Modal } from '@freecodecamp/react-bootstrap'; import ga from '../../../analytics'; <ins> import Login from '../../../components/Header/components/Login'; </ins> import GreenPass from '../../../assets/icons/GreenPass'; import { dasherize } from '../../../../../utils/slugs';

challengeMetaSelector } from '../redux'; <ins> import { isSignedInSelector } from '../../../redux'; </ins> const mapStateToProps = createSelector( challengeFilesSelector, challengeMetaSelector, isCompletionModalOpenSelector, <ins> isSignedInSelector, </ins> successMessageSelector, <del> (files, { title }, isOpen, message) => ({ </del> <ins> (files, { title }, isOpen, isSignedIn, message) => ({ </ins> files, title, isOpen, <ins> isSignedIn, </ins> message }) );

files: PropTypes.object.isRequired, handleKeypress: PropTypes.func.isRequired, isOpen: PropTypes.bool, <ins> isSignedIn: PropTypes.bool.isRequired, </ins> message: PropTypes.string, submitChallenge: PropTypes.func.isRequired, title: PropTypes.string

const { close, isOpen, <ins> isSignedIn, </ins> submitChallenge, handleKeypress, message,

bsStyle='primary' onClick={submitChallenge} > <del> Submit and go to next challenge{' '} </del> <ins> {isSignedIn ? 'Submit and g' : 'G'}o to next challenge{' '} </ins> <span className='hidden-xs'>(Ctrl + Enter)</span> </Button> <ins> {isSignedIn ? null : ( <Login block={true} bsSize='lg' bsStyle='primary' className='btn-invert' > Sign in to save your progress </Login> )} </ins> {this.state.downloadURL ? ( <Button block={true}