diff options
author | Regis <boudinot.regis@yahoo.com> | 2017-01-15 11:21:12 -0500 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2017-01-15 11:21:12 -0500 |
commit | 258b090fb9719db245be606ca93fd5331dc7e8d1 (patch) | |
tree | eae315ba55911aa8e5fea7629b616b0bd5ac492f | |
parent | f1ca332bd39bca0a1d9ad40e49d282a5222b87b6 (diff) | |
download | gitlab-ce-258b090fb9719db245be606ca93fd5331dc7e8d1.tar.gz |
fix UI without Promise or timeOut/interval
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/stage.js.es6 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/stage.js.es6 b/app/assets/javascripts/vue_pipelines_index/stage.js.es6 index b6a20dd5994..ddfd00df42e 100644 --- a/app/assets/javascripts/vue_pipelines_index/stage.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/stage.js.es6 @@ -1,5 +1,5 @@ /* global Vue, Flash, gl */ -/* eslint-disable no-param-reassign */ +/* eslint-disable no-param-reassign, no-bitwise */ ((gl) => { gl.VueStage = Vue.extend({ @@ -32,7 +32,14 @@ const areaExpanded = e.currentTarget.attributes['aria-expanded']; if (areaExpanded && (areaExpanded.textContent === 'true')) { - return setTimeout(() => (this.request = false), 100); + const related = e.relatedTarget; + if (!related) { + return this.clearBuilds(); + } else if (!related.parentElement) { + return this.clearBuilds(); + } else if (~related.parentElement.parentElement.className.indexOf('js-builds-dropdown-container')) { + return null; + } } if (this.request) return this.clearBuilds(); |