From f9595b98b3af67808adc947a74b22001faf5800a Mon Sep 17 00:00:00 2001 From: "J.C. Zhong" Date: Mon, 13 Jan 2025 11:28:18 -0800 Subject: [PATCH] fix: make sure the cmd-f still work on readonly docs (#1532) --- querybook/webapp/components/QueryEditor/QueryEditor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/querybook/webapp/components/QueryEditor/QueryEditor.tsx b/querybook/webapp/components/QueryEditor/QueryEditor.tsx index 9730d8a37..a5c8aabce 100644 --- a/querybook/webapp/components/QueryEditor/QueryEditor.tsx +++ b/querybook/webapp/components/QueryEditor/QueryEditor.tsx @@ -459,7 +459,9 @@ export const QueryEditor: React.FC< maxHeight={height === 'auto' ? '50vh' : null} extensions={extensions} basicSetup={basicSetup} - editable={!readOnly} + // editable is working on the editor view. set as true to make it still respond to keymaps, e.g. search + editable={true} + // readonly is working on the editor state. when true, the editor content will not change anyway. readOnly={readOnly} autoFocus={false} onChange={onChangeHandler}