diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-07-18 20:26:31 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-07-18 20:40:43 +0800 |
commit | f329c232a23e849a178381e92f3042d1d97303f2 (patch) | |
tree | e795947ae771d77199f19127f3a4e0cd12da2fc9 /ui/responsive/app/components/editable-label.js | |
parent | b9dfb3cd1e825961dd3e32065d2bf377f2f59355 (diff) | |
download | tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar.gz tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar.bz2 tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar.lz tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar.xz tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.tar.zst tangerine-wallet-browser-f329c232a23e849a178381e92f3042d1d97303f2.zip |
Hook up new dropdown components
Diffstat (limited to 'ui/responsive/app/components/editable-label.js')
-rw-r--r-- | ui/responsive/app/components/editable-label.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/responsive/app/components/editable-label.js b/ui/responsive/app/components/editable-label.js index 43841bdd8..167be7eaf 100644 --- a/ui/responsive/app/components/editable-label.js +++ b/ui/responsive/app/components/editable-label.js @@ -30,15 +30,17 @@ EditableLabel.prototype.render = function () { } else { return h('div.name-label', { onClick: (event) => { - if (event.target.getAttribute('name') === 'edit') { + const nameAttribute = event.target.getAttribute('name') + // checks for class to handle smaller CTA above the account name + const classAttribute = event.target.getAttribute('class') + if (nameAttribute === 'edit' || classAttribute === 'edit-text') { this.setState({ isEditingLabel: true }) } }, }, this.props.children) } } -// class = edit-text -// name = edit + EditableLabel.prototype.saveIfEnter = function (event) { if (event.key === 'Enter') { this.saveText() |