Skip to content

Commit 0397629

Browse files
committed
fix: Prevent event propagation in Find and Replace keydown handlers
1 parent 3b8ccb1 commit 0397629

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Common/CodeMirror/Extensions/findAndReplace.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace }: FindReplaceProp
160160
}
161161

162162
const onFindKeyDown = (e: ReactKeyboardEvent<HTMLInputElement>) => {
163+
e.stopPropagation()
163164
if (e.key === 'Enter') {
164165
e.preventDefault()
165166
if (e.shiftKey) {
@@ -175,6 +176,7 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace }: FindReplaceProp
175176
}
176177

177178
const onReplaceKeyDown = (e: ReactKeyboardEvent<HTMLInputElement>) => {
179+
e.stopPropagation()
178180
if (e.key === 'Enter') {
179181
e.preventDefault()
180182
replaceNext(view)

0 commit comments

Comments
 (0)