From 55ba4bd106b5815fd54bda0857ecead79d5fa415 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 15 Dec 2021 10:46:25 -0500 Subject: [PATCH] ShowablePassword, IconButton: submit on Enter --- app/soapbox/components/icon_button.js | 5 +++++ app/soapbox/components/showable_password.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/icon_button.js b/app/soapbox/components/icon_button.js index d7c036f12..aab5739d3 100644 --- a/app/soapbox/components/icon_button.js +++ b/app/soapbox/components/icon_button.js @@ -33,6 +33,7 @@ export default class IconButton extends React.PureComponent { tabIndex: PropTypes.string, text: PropTypes.string, emoji: PropTypes.string, + type: PropTypes.string, }; static defaultProps = { @@ -47,6 +48,7 @@ export default class IconButton extends React.PureComponent { onClick: () => {}, onMouseEnter: () => {}, onMouseLeave: () => {}, + type: 'button', }; handleClick = (e) => { @@ -106,6 +108,7 @@ export default class IconButton extends React.PureComponent { title, text, emoji, + type, } = this.props; const classes = classNames(className, 'icon-button', { @@ -134,6 +137,7 @@ export default class IconButton extends React.PureComponent { onMouseLeave={this.props.onMouseLeave} tabIndex={tabIndex} disabled={disabled} + type={type} >
{emoji @@ -163,6 +167,7 @@ export default class IconButton extends React.PureComponent { onMouseLeave={this.props.onMouseLeave} tabIndex={tabIndex} disabled={disabled} + type={type} >
{emoji diff --git a/app/soapbox/components/showable_password.js b/app/soapbox/components/showable_password.js index a6dbdad24..ee5294afc 100644 --- a/app/soapbox/components/showable_password.js +++ b/app/soapbox/components/showable_password.js @@ -61,4 +61,4 @@ class ShowablePassword extends ImmutablePureComponent { ); } -} \ No newline at end of file +}