mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 05:18:36 +00:00
Event targets can be DOM text nodes (nodeType 3) which lack the .closest() method. Add a get-element helper that normalizes text nodes to their parent Element before calling .closest(), matching the existing pattern in dom/get-parent-with-data. Fixes #10640 AI-assisted-by: mimo-v2.5-pro