Skip to content

Commit

Permalink
re: Snippets bug - update changeset and minor refactor (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib authored Oct 10, 2024
1 parent c5d5808 commit d74a3a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .changeset/four-peaches-attack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
'playroom': patch
---

Disable snippet previews while the snippets panel is closing.

Previously, snippet previews could be triggered while the snippet panel was closing, causing preview frames to enter an invalid state.
Previewing a snippet will now only work when the snippet panel is open.
Fixes a bug that was causing erroneous snippet previews and broken preview updates when moving the cursor in the snippets panel while the snippets panel was closing.
4 changes: 1 addition & 3 deletions src/Playroom/Snippets/Snippets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ export default ({ isOpen, snippets, onHighlight, onClose }: Props) => {
}
: undefined
}
onMouseDown={() => {
closeHandler(filteredSnippets[index]);
}}
onMouseDown={() => closeHandler(filteredSnippets[index])}
title={getLabel(snippet)}
>
<Stack space="none">
Expand Down

0 comments on commit d74a3a8

Please sign in to comment.