pixelandtonic / garnishjs

UI toolkit by Pixel & Tonic
MIT License
39 stars 5 forks source link

HUD excessive binding of resize listeners #4

Closed benjamminf closed 6 years ago

benjamminf commented 7 years ago

https://github.com/pixelandtonic/garnishjs/blob/develop/src/HUD.js#L406

Not sure the purpose of binding the resize listener in the updateSizeAndPosition method, as every time it's called a new event is added, causing the performance of the UI to slow to a crawl very quickly. Removing these lines seems to make everything work fine (in context of Craft's CP) as the listener is already bound in the init method.

brandonkelly commented 6 years ago

This was fixed via 4d2c01c432df41427df7d368ef058974f620b5a0