PolyGerrit: Fix gr-ssh-editor
When you clicked on the key in the columns
"Algorithm"
"Public key"
"Comment"
they showed blank. No data was being populated.
This fixes the issue.
Bug: Issue 7400
Change-Id: If98d09be4e023e519fbbce4f1f9cfae7df401de9
diff --git a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js
index d5067aa..328d3d9 100644
--- a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js
+++ b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js
@@ -58,7 +58,8 @@
},
_showKey(e) {
- const index = parseInt(e.target.getAttribute('data-index'), 10);
+ const el = e.currentTarget;
+ const index = parseInt(el.getAttribute('data-index'), 10);
this._keyToView = this._keys[index];
this.$.viewKeyOverlay.open();
},
@@ -68,7 +69,8 @@
},
_handleDeleteKey(e) {
- const index = parseInt(e.target.getAttribute('data-index'), 10);
+ const el = e.currentTarget;
+ const index = parseInt(el.getAttribute('data-index'), 10);
this.push('_keysToRemove', this._keys[index]);
this.splice('_keys', index, 1);
this.hasUnsavedChanges = true;