Skip to content

Commit

Permalink
fix: make sure the cmd-f still work on readonly docs (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 authored Jan 13, 2025
1 parent ac64e35 commit f9595b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion querybook/webapp/components/QueryEditor/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit f9595b9

Please sign in to comment.