mirror of
https://github.com/discourse/discourse.git
synced 2025-03-11 07:05:29 +08:00

Small refactor to move the `DComposerPosition` component to be a function used on the `setupEditor` editor lifecycle, so it's recycled/re-added whenever the editor component is mounted. Additionally, we reference the passed `editor` instead of the `event.target`, allowing a `contentEditable` editor (which is a DOM tree) to still work with the positioning hack.