mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 16:06:10 +00:00
What is the problem? When opening the composer, we are seeing multiple requests made to the `/composer_messages` endpoint. This is due to our use of the `transitionend` event on the `#reply-control` element. The event is fired once for each transition event and the `#reply-control` element has multiple transition events. What is the solution? Since are only interested in the `height` transition event, we add a condition to check that the callback function is only triggered when the `propertyName` of the `transitionend` event is `height`. Why is there no tests for this change? In QUnit, we have `transition: none !important` set in the stylesheet with no easy way to disable. We'll have to accept the risk of not writing test for this performance fix.