]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Prevent infinite resize when vertical scrollbar appears (#6011)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Wed, 30 Jan 2019 10:43:42 +0000 (12:43 +0200)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Wed, 30 Jan 2019 10:48:56 +0000 (11:48 +0100)
commit97da221f27b41d48e243549372ed15137e34bb3e
tree13a5ab075464b27367953fa66cb7d67115e0b99c
parent29f7fa23bbb3a241d2ab609d33ce5d8ca50c5348
Prevent infinite resize when vertical scrollbar appears (#6011)

If the container size shrank during chart resize, let's assume scrollbar appeared. So we resize again with the scrollbar visible effectively making chart smaller and the scrollbar hidden again. Because we are inside `throttled`, and currently `ticking`, scroll events are ignored during this whole 2 resize process. If we assumed wrong and something else happened, we are resizing twice in a frame (potential performance issue)
src/core/core.controller.js
src/platforms/platform.dom.js