CodeQL model editor: Don't highlight row when clicking inside text box (#3264)

This commit is contained in:
Shati Patel
2024-01-22 16:29:24 +00:00
committed by GitHub
parent 9644e5daee
commit 5664844aba

View File

@@ -15,6 +15,10 @@ type Props = {
"aria-label"?: string;
};
const stopClickPropagation = (e: React.MouseEvent) => {
e.stopPropagation();
};
export const ModelTypeTextbox = ({
modeledMethod,
typeInfo,
@@ -48,5 +52,12 @@ export const ModelTypeTextbox = ({
500,
);
return <VSCodeTextField value={value} onInput={handleChange} {...props} />;
return (
<VSCodeTextField
value={value}
onInput={handleChange}
onClick={stopClickPropagation}
{...props}
/>
);
};