aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-10-05 11:49:06 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-10-05 11:49:06 +0800
commit64d8f91371ad6253e694c472a681e69474a3df94 (patch)
treef0c8cdab65916db35d4fa4c8c0a9200b8475ea4f /ui/app
parent1158855a15c6b14a5d9fde0a6007feabcc05ea85 (diff)
downloadtangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar.gz
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar.bz2
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar.lz
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar.xz
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.tar.zst
tangerine-wallet-browser-64d8f91371ad6253e694c472a681e69474a3df94.zip
Add conditional logic for adding listener.
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/first-time/disclaimer.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js
index 423d327ca..1c01718eb 100644
--- a/ui/app/first-time/disclaimer.js
+++ b/ui/app/first-time/disclaimer.js
@@ -62,9 +62,11 @@ DisclaimerScreen.prototype.render = function () {
h('div.markdown', {
onScroll: (e) => {
var object = e.currentTarget
- if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) {
- var button = document.getElementById('agree')
+ var button = document.getElementById('agree')
+ if ((object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) && button.disabled) {
button.disabled = false
+ button.innerHTML = 'I Agree'
+ console.log("YAHALLO")
button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer()))
}
},
@@ -89,7 +91,7 @@ DisclaimerScreen.prototype.render = function () {
style: { marginTop: '18px' },
disabled: true,
onClick: () => this.props.dispatch(actions.agreeToDisclaimer()),
- }, 'I Agree'),
+ }, 'Scroll to Enable'),
])
)
}