1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Sign button is enabled after scrolling all the way to the bottom (#14745)

This commit is contained in:
VSaric 2022-05-24 17:28:40 +02:00 committed by GitHub
parent e06e5599bb
commit e7d1476522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 7 deletions

View File

@ -87,6 +87,3 @@
.identicon {}
}
.signature-request-footer {
flex: 1 1 auto;
}

View File

@ -17,10 +17,10 @@ export default class SignatureRequestFooter extends PureComponent {
const { cancelAction, signAction, disabled = false } = this.props;
return (
<div className="signature-request-footer">
<Button onClick={cancelAction} type="secondary" large>
<Button onClick={cancelAction} type="secondary">
{this.context.t('cancel')}
</Button>
<Button onClick={signAction} type="primary" disabled={disabled} large>
<Button onClick={signAction} type="primary" disabled={disabled}>
{this.context.t('sign')}
</Button>
</div>

View File

@ -1,7 +1,7 @@
.signature-request-message {
flex: 1 60%;
display: flex;
max-height: 230px;
max-height: 231px;
flex-direction: column;
position: relative;

View File

@ -26,7 +26,7 @@ export default class SignatureRequestMessage extends PureComponent {
}
const { scrollTop, offsetHeight, scrollHeight } = this.props.messageRootRef;
const isAtBottom = scrollTop + offsetHeight >= scrollHeight;
const isAtBottom = Math.round(scrollTop) + offsetHeight >= scrollHeight;
if (isAtBottom) {
this.setState({ messageIsScrolled: true });