Skip to content

Debounce with maxWait misses some calls #2229

@mb-dev

Description

@mb-dev

I noticed there's an issue with debounce and maxWait. On subsequent calls right after the maxWait, the debounced function is not getting called.

Check this jsfiddle with an open console:
https://jsfiddle.net/9fjt512m/

My output (Chrome on Max OSX) looks like this:
calling debounce
calling debounce
debounced run
calling debounce
calling debounce

I would expect another "debounced run" at the end, but none is happening. Might be related to the #2093 that was merged a month ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions