Mforns has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/402026 )
Change subject: Replace setTimeout with Vue.nextTick
......................................................................
Replace setTimeout with Vue.nextTick
Bug: T180412
Change-Id: I3c6cbccb6084a2a072a34d38e5adb8b84d508620
---
M src/components/TopicExplorer.vue
M src/components/WikiSelector.vue
2 files changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats2
refs/changes/26/402026/1
diff --git a/src/components/TopicExplorer.vue b/src/components/TopicExplorer.vue
index 0371b05..9adabf5 100644
--- a/src/components/TopicExplorer.vue
+++ b/src/components/TopicExplorer.vue
@@ -44,6 +44,7 @@
</template>
<script>
+import Vue from 'vue';
import { mapState } from 'vuex';
import _ from '../lodash-custom-bundle';
import config from '../config'
@@ -99,9 +100,9 @@
this.searchDisplay = '';
},
onBlur () {
- setTimeout(() => {
+ Vue.nextTick(() => {
this.close();
- }, 200);
+ });
},
changeHighlight (indexDiff) {
if (this.$refs.searchResults) {
diff --git a/src/components/WikiSelector.vue b/src/components/WikiSelector.vue
index bf8c50d..be863ec 100644
--- a/src/components/WikiSelector.vue
+++ b/src/components/WikiSelector.vue
@@ -169,11 +169,11 @@
onBlur () {
let fam = this.family;
let proj = this.project;
- setTimeout(() => {
+ Vue.nextTick(() => {
if (this.family === fam && proj === this.project) {
this.close();
};
- }, 200);
+ });
},
onMouseOver () {
let input = $('input', this.$el);
--
To view, visit https://gerrit.wikimedia.org/r/402026
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c6cbccb6084a2a072a34d38e5adb8b84d508620
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats2
Gerrit-Branch: master
Gerrit-Owner: Mforns <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits