mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Implemented scroll-to-bottom functionality for button activation.
This commit is contained in:
parent
8671869311
commit
3628c5b324
@ -50,6 +50,14 @@ DisclaimerScreen.prototype.render = function () {
|
|||||||
`),
|
`),
|
||||||
|
|
||||||
h('div.markdown', {
|
h('div.markdown', {
|
||||||
|
onScroll: (e) => {
|
||||||
|
var object = e.currentTarget
|
||||||
|
if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) {
|
||||||
|
var button = document.getElementById('agree')
|
||||||
|
button.disabled = false
|
||||||
|
button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer()))
|
||||||
|
}
|
||||||
|
},
|
||||||
style: {
|
style: {
|
||||||
// whiteSpace: 'pre-line',
|
// whiteSpace: 'pre-line',
|
||||||
background: 'rgb(235, 235, 235)',
|
background: 'rgb(235, 235, 235)',
|
||||||
@ -67,11 +75,11 @@ DisclaimerScreen.prototype.render = function () {
|
|||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h('button', {
|
h('button#agree', {
|
||||||
style: { marginTop: '18px' },
|
style: { marginTop: '18px' },
|
||||||
|
disabled: true,
|
||||||
onClick: () => this.props.dispatch(actions.agreeToDisclaimer()),
|
onClick: () => this.props.dispatch(actions.agreeToDisclaimer()),
|
||||||
}, 'I Agree'),
|
}, 'I Agree'),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user