aboutsummaryrefslogtreecommitdiffstats
path: root/ui/responsive/app/components/editable-label.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/responsive/app/components/editable-label.js')
-rw-r--r--ui/responsive/app/components/editable-label.js8
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()