]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Fix detecting changed events (#9050)
authorJosh Kelley <joshkel@gmail.com>
Mon, 10 May 2021 12:48:03 +0000 (08:48 -0400)
committerGitHub <noreply@github.com>
Mon, 10 May 2021 12:48:03 +0000 (08:48 -0400)
commit1df4883aff050e9e320f9327be96e228fcc588cc
tree15a2df73b08be74f48f49721aad2879c90f2c04b
parentc955ffad64195fb17f214eae6be522287eadc586
Fix detecting changed events (#9050)

* Fix detecting changed events

Because `this._listeners` may contain both event handlers from options and internal event handlers for responsive support, the `setsEqual` check would often fail, causing event handlers to be unnecessarily detached and reattached and fired.

If I'm understanding correctly, this is the root cause of #9049.

* Use a separate object for responsive listeners

Correctly update events when responsive property changes as well as when requested events change.

* Code review feedback
src/core/core.controller.js