mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Sign button is enabled after scrolling all the way to the bottom (#14745)
This commit is contained in:
parent
e06e5599bb
commit
e7d1476522
@ -87,6 +87,3 @@
|
||||
.identicon {}
|
||||
}
|
||||
|
||||
.signature-request-footer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -1,7 +1,7 @@
|
||||
.signature-request-message {
|
||||
flex: 1 60%;
|
||||
display: flex;
|
||||
max-height: 230px;
|
||||
max-height: 231px;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
|
@ -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 });
|
||||
|
Loading…
Reference in New Issue
Block a user