| commit | e9bd3e286d6ee6a79cc96cfb7df39ada60344277 | [log] [tgz] |
|---|---|---|
| author | Wyatt Allen <wyatta@google.com> | Wed Jul 26 09:44:27 2017 -0700 |
| committer | Wyatt Allen <wyatta@google.com> | Mon Jul 31 16:30:32 2017 -0700 |
| tree | 15de0da003d969f8b650bf76d7a8546e3641e108 | |
| parent | 95a81e832849ba418bfbc7fc0b07685c1d66f3a5 [diff] [blame] |
Document need for async title-change Better documentation for the fix in Ia32e76023c. Change-Id: Ia272196248fc2acdec7041137e1d452ff70d0f06
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js index db534b4..d5f6c1f 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -468,6 +468,9 @@ }; this._path = value.path; + // NOTE: This may be called before attachment (e.g. while parentElement is + // null). Fire title-change in an async so that, if attachment to the DOM + // has been queued, the event can bubble up to the handler in gr-app. this.async(() => { this.fire('title-change', {title: this._computeTruncatedFileDisplayName(this._path)});