mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 17:12:37 +08:00

When browsing through a sidebar with this feature enabled (i.e. admin, or docs), it's weird to have the scroll jump around when you click an item. This commit adds a check, so that we only `scrollIntoView` for items which are not already in the viewport. Followup to b7cce1a0dcae18b3b8e4ed3bb06db43b5b71180d