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 {}
|
.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;
|
const { cancelAction, signAction, disabled = false } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className="signature-request-footer">
|
<div className="signature-request-footer">
|
||||||
<Button onClick={cancelAction} type="secondary" large>
|
<Button onClick={cancelAction} type="secondary">
|
||||||
{this.context.t('cancel')}
|
{this.context.t('cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={signAction} type="primary" disabled={disabled} large>
|
<Button onClick={signAction} type="primary" disabled={disabled}>
|
||||||
{this.context.t('sign')}
|
{this.context.t('sign')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.signature-request-message {
|
.signature-request-message {
|
||||||
flex: 1 60%;
|
flex: 1 60%;
|
||||||
display: flex;
|
display: flex;
|
||||||
max-height: 230px;
|
max-height: 231px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ export default class SignatureRequestMessage extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { scrollTop, offsetHeight, scrollHeight } = this.props.messageRootRef;
|
const { scrollTop, offsetHeight, scrollHeight } = this.props.messageRootRef;
|
||||||
const isAtBottom = scrollTop + offsetHeight >= scrollHeight;
|
const isAtBottom = Math.round(scrollTop) + offsetHeight >= scrollHeight;
|
||||||
|
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
this.setState({ messageIsScrolled: true });
|
this.setState({ messageIsScrolled: true });
|
||||||
|
Loading…
Reference in New Issue
Block a user