aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-01 09:46:27 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-01 09:46:27 +0800
commit89b0d3d40318cc119195f295e39a595cac5ff540 (patch)
tree33c66f4c1fd919dafdcb3ee7d547a9835170ee39 /ui/app
parent753de30b3b2ed732e7533dc086f8f47a4ac7f7f4 (diff)
downloadtangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar.gz
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar.bz2
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar.lz
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar.xz
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.tar.zst
tangerine-wallet-browser-89b0d3d40318cc119195f295e39a595cac5ff540.zip
Make fox look away while typing password
Inspired by this tweet: https://twitter.com/Aashay/status/858791285976481792
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/unlock.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/unlock.js b/ui/app/unlock.js
index 1aee3c5d0..de372817d 100644
--- a/ui/app/unlock.js
+++ b/ui/app/unlock.js
@@ -109,10 +109,10 @@ UnlockScreen.prototype.submitPassword = function (event) {
UnlockScreen.prototype.inputChanged = function (event) {
// tell mascot to look at page action
var element = event.target
- var boundingRect = element.getBoundingClientRect()
- var coordinates = getCaretCoordinates(element, element.selectionEnd)
- this.animationEventEmitter.emit('point', {
- x: boundingRect.left + coordinates.left - element.scrollLeft,
- y: boundingRect.top + coordinates.top - element.scrollTop,
- })
+ var viewRect = element.getBoundingClientRect()
+ var carat = getCaretCoordinates(element, element.selectionEnd)
+ var x = viewRect.right - carat.left + element.scrollLeft
+ var y = 300
+ var pointAt = { x, y }
+ this.animationEventEmitter.emit('point', pointAt)
}