diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | gui/src/renderer/components/Login.tsx | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cbc145f6f..5e6a3652e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ Line wrap the file at 100 chars. Th ### Fixed - Fix link to download page not always using the beta URL when it should. - Fix deadlock that may occur when the API cannot be reached while entering the connecting state. +- Fix bug causing desktop app to log in if account number field was filled when removing account + history. #### Linux - Make offline monitor aware of routing table changes. diff --git a/gui/src/renderer/components/Login.tsx b/gui/src/renderer/components/Login.tsx index e672094f99..29923d7d0f 100644 --- a/gui/src/renderer/components/Login.tsx +++ b/gui/src/renderer/components/Login.tsx @@ -276,8 +276,7 @@ export default class Login extends React.Component<IProps, IState> { aria-label={ // TRANSLATORS: This is used by screenreaders to communicate the login button. messages.pgettext('accessibility', 'Login') - } - onClick={this.onSubmit}> + }> <StyledInputSubmitIcon visible={this.props.loginState.type !== 'logging in'} source="icon-arrow" @@ -351,9 +350,14 @@ function AccountDropdownItem(props: IAccountDropdownItemProps) { props.onSelect(props.value); }, [props.onSelect, props.value]); - const handleRemove = useCallback(() => { - props.onRemove(props.value); - }, [props.onRemove, props.value]); + const handleRemove = useCallback( + (event) => { + // Prevent login form from submitting + event.preventDefault(); + props.onRemove(props.value); + }, + [props.onRemove, props.value], + ); return ( <> |
