mirror of
https://github.com/discourse/discourse.git
synced 2025-05-03 10:34:35 +08:00

The problem is mainly that we also have a css animation made from js which was setting a different width for the panel, so the `style.width = "auto"` was not overriding this part. This animation happens in a parent component after `didResizeContainer` is called, so it could be fine most of the times, but the simpler change is to ensure, panel resize, or window resize ends up in the same codepath so whatever the developer decides to do in `didResizeContainer` hook will be applied in both cases. No test as it's fairly hard to test and would require a complex system spec setup. It avoids this situation where the side panel is larger than viewport after window resize: 