When the user downloads their solution before proceeding to the next challenge, the solution is downloaded again on Ctrl + Enter. The issue is that once the user has downloaded their solution, the download button is in focus, so pressing Ctrl + Enter will not only dispatch the submit challenge event, it'll also dispatch the click event on the download button which is not what we want. This disables that event. Closes #34967
This commit is contained in:
@ -39,6 +39,7 @@ const mapDispatchToProps = function(dispatch) {
|
||||
close: () => dispatch(closeModal('completion')),
|
||||
handleKeypress: e => {
|
||||
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
|
||||
e.preventDefault();
|
||||
dispatch(submitChallenge());
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user