diff --git a/src/libs/KeyboardShortcut/index.js b/src/libs/KeyboardShortcut/index.js index f948d69914610..39ffed7c65408 100644 --- a/src/libs/KeyboardShortcut/index.js +++ b/src/libs/KeyboardShortcut/index.js @@ -103,8 +103,11 @@ function bindHandlerToKeydownEvent(event) { } // Make sure we don't add multiple listeners -document.removeEventListener('keydown', bindHandlerToKeydownEvent, {capture: true}); -document.addEventListener('keydown', bindHandlerToKeydownEvent, {capture: true}); +const rootNode = document.getElementById('root'); +rootNode.removeEventListener('keydown', bindHandlerToKeydownEvent); +rootNode.addEventListener('keydown', bindHandlerToKeydownEvent); +window.removeEventListener('keydown', bindHandlerToKeydownEvent); +window.addEventListener('keydown', bindHandlerToKeydownEvent); /** * Unsubscribes a keyboard event handler. diff --git a/src/pages/signin/ChangeExpensifyLoginLink.js b/src/pages/signin/ChangeExpensifyLoginLink.js index 8d48d708bc9e2..fdf7dc437c2d3 100755 --- a/src/pages/signin/ChangeExpensifyLoginLink.js +++ b/src/pages/signin/ChangeExpensifyLoginLink.js @@ -40,6 +40,10 @@ const ChangeExpensifyLoginLink = props => ( { + e.stopPropagation(); + Session.clearSignInData(); + }} underlayColor={themeColors.componentBG} > diff --git a/src/pages/signin/PasswordForm.js b/src/pages/signin/PasswordForm.js index 0801487c88038..571f2353bf6be 100755 --- a/src/pages/signin/PasswordForm.js +++ b/src/pages/signin/PasswordForm.js @@ -181,6 +181,7 @@ class PasswordForm extends React.Component {