Skip to content

Commit

Permalink
docs: fix shortcut opens search while typing in playground editor (#9831
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pskelin authored Sep 9, 2024
1 parent ca8330e commit e64c8f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/website/src/components/Editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ ${fixAssetPaths(_js)}`,
tabBarRef.current.project = projectRef.current;
fileEditorRef.current.project = projectRef.current;
previewRef.current.project = projectRef.current;

// algolia search opens the search on key `/` because this custom element is the event target but has no `isContentEditable`
Object.defineProperty(fileEditorRef.current, "isContentEditable", {
get() {
return true;
},
});

tabBarRef.current.editor = fileEditorRef.current;

Expand Down

0 comments on commit e64c8f1

Please sign in to comment.