0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Fixed esc not working for newsletter switch

refs https://github.com/TryGhost/members.js/issues/95

- Newsletter switch was taking over the focus and Esc didn't work on click, fixes by preventing the default behavior of switch
This commit is contained in:
Rish 2020-09-08 18:52:20 +05:30
parent 21a7d61c85
commit 01cb5567ad

View file

@ -385,6 +385,7 @@ export default class AccountHomePage extends React.Component {
}
onToggleSubscription(e, subscribed) {
e.preventDefault();
this.context.onAction('updateNewsletter', {subscribed: !subscribed});
}