Bug: Prevent focus error when saving insight after viewing recording #31679
Labels
bug
Something isn't working right
feature/insights
Feature Tag: Insights overall
team/product-analytics
Bug Description
Bug description
TypeError in LemonTree component when saving an insight after viewing a recording. The error occurs when trying to call
.focus()
on a null DOM element:File:
frontend/src/lib/lemon-ui/LemonTree/LemonTree.tsx
How to reproduce
Affected code:
The bug happens because keyboard navigation/typeahead/focus helpers try to focus DOM elements after UI state changes, but don't check if the elements still exist.
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/29700
Debug info
The text was updated successfully, but these errors were encountered: