Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 362c2d7

Browse files
author
Narciso Jaramillo
committed
Added clarifying comments per code review
1 parent d73470f commit 362c2d7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/search/QuickOpen.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ define(function (require, exports, module) {
173173
}
174174

175175
/**
176-
* True if the dialog is currently open.
176+
* True if the dialog is currently open. Note that this is set to false immediately
177+
* when the dialog starts closing; it doesn't wait for the ModalBar animation to finish.
177178
* @type {boolean}
178179
*/
179180
QuickNavigateDialog.prototype.isOpen = false;
@@ -458,6 +459,10 @@ define(function (require, exports, module) {
458459
return this._closeDeferred.promise();
459460
}
460461
this.isOpen = false;
462+
463+
// We can't just return the ModalBar's `close()` promise because we need to do it on a
464+
// setTimeout, so we create our own Deferred and cache it so we can return it if multiple
465+
// callers happen to call `close()`.
461466
this._closeDeferred = new $.Deferred();
462467

463468
var i;

0 commit comments

Comments
 (0)