commit | 43d22deb14e3d25b67166e44b3f7a033d6c1ff27 | [log] [tgz] |
---|---|---|
author | Milutin Kristofic <milutin@google.com> | Wed May 11 16:36:09 2022 +0200 |
committer | Milutin Kristofic <milutin@google.com> | Wed May 11 20:32:29 2022 +0200 |
tree | 8e8f4e7f53a389db009d4f9cc16ba285d869bea5 | |
parent | 374c072c32de82d629f73682c848ec9d1f402812 [diff] |
Fix focus to commit message After clicking edit button, editable-content tried to put focus into textarea. However iron-autogrow-textarea was not yet rendered so it throw js error: Error: selector 'iron-autogrow-textarea' did not match anything' Google-Bug-Id: b/228800894 Release-Notes: skip Change-Id: I51a48f84f750798d6a93a00ca765b308341b7517
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts index 99b72fa..bdd2b52 100644 --- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts +++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts
@@ -424,8 +424,9 @@ } } - handleEditCommitMessage() { + async handleEditCommitMessage() { this.editing = true; + await this.updateComplete; this.focusTextarea(); } }