Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that events are always sent on blur
Relates to: phoenixframework#3033 Relates to: phoenixframework#2318 Fixes: phoenixframework#3076 The old "fix" from phoenixframework#3033 had a fatal flaw because it would call an old callback on blur. This new commit adjusts the behavior to properly use the correct callback by hooking into the cycle logic and ignoring the throttle in case of blur, leaving the rest of the logic nearly untouched. This requires us to clear the throttle timeout though, because otherwise we would call the callback again after a blur, or multiple times when new events happen after blur but before the next throttle timeout triggers. The debounce/throttle code is not that easy to understand, but this time I'm more confident that the solution is actually correct. (famous last words)
- Loading branch information