From d06334e15133de40895dda6639955d162339a3d0 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 27 Feb 2019 18:31:51 -0800 Subject: [PATCH] Add comment about order when re-debouncing --- lib/utils/debounce.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/debounce.html b/lib/utils/debounce.html index 01142cbd95..5b9e4d2a82 100644 --- a/lib/utils/debounce.html +++ b/lib/utils/debounce.html @@ -52,6 +52,10 @@ if (this.isActive()) { this._cancelAsync(); this._timer = null; + // Canceling a debouncer removes its spot from the flush queue, + // so if a debouncer is manually canceled and re-debounced, it + // will reset its flush order (this is a very minor difference from 1.x) + // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order debouncerQueue.delete(this); } }