Skip to content

Commit 00be427

Browse files
authored
Merge pull request #3675 from ethereum/yann300-patch-51
fix adding breakpoint
2 parents 6e8dcc7 + b653099 commit 00be427

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,10 @@ export const EditorUI = (props: EditorUIProps) => {
556556
reducerListener(props.plugin, dispatch, monacoRef.current, editorRef.current, props.events)
557557
props.events.onEditorMounted()
558558
editor.onMouseUp((e) => {
559-
if (e && e.target && e.target.toString().startsWith('GUTTER')) {
559+
// see https://microsoft.github.io/monaco-editor/typedoc/enums/editor.MouseTargetType.html
560+
// 2 is GUTTER_GLYPH_MARGIN
561+
// 3 is GUTTER_LINE_NUMBERS
562+
if (e && e.target && (e.target.type === 2 || e.target.type === 3)) {
560563
(window as any).addRemixBreakpoint(e.target.position)
561564
}
562565
})

0 commit comments

Comments
 (0)