File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
src/browser/components/Settings/sections Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ export function ModelRow(props: ModelRowProps) {
4747 onChange = { ( e ) => props . onEditChange ?.( e . target . value ) }
4848 onKeyDown = { ( e ) => {
4949 if ( e . key === "Enter" ) props . onSaveEdit ?.( ) ;
50- if ( e . key === "Escape" ) props . onCancelEdit ?.( ) ;
50+ if ( e . key === "Escape" ) {
51+ e . stopPropagation ( ) ;
52+ props . onCancelEdit ?.( ) ;
53+ }
5154 } }
5255 className = "bg-modal-bg border-border-medium focus:border-accent min-w-0 flex-1 rounded border px-2 py-0.5 font-mono text-xs focus:outline-none"
5356 autoFocus
Original file line number Diff line number Diff line change @@ -295,10 +295,12 @@ export const ProjectSettingsSection: React.FC = () => {
295295 onChange = { ( e ) => setEditCommand ( e . target . value ) }
296296 className = "border-border-medium bg-secondary/30 text-foreground placeholder:text-muted-foreground focus:ring-accent mt-1 w-full rounded-md border px-2 py-1 text-xs focus:ring-1 focus:outline-none"
297297 autoFocus
298+ spellCheck = { false }
298299 onKeyDown = { ( e ) => {
299300 if ( e . key === "Enter" ) {
300301 void handleSaveEdit ( ) ;
301302 } else if ( e . key === "Escape" ) {
303+ e . stopPropagation ( ) ;
302304 handleCancelEdit ( ) ;
303305 }
304306 } }
Original file line number Diff line number Diff line change @@ -264,7 +264,10 @@ export function ProvidersSection() {
264264 autoFocus
265265 onKeyDown = { ( e ) => {
266266 if ( e . key === "Enter" ) handleSaveEdit ( ) ;
267- if ( e . key === "Escape" ) handleCancelEdit ( ) ;
267+ if ( e . key === "Escape" ) {
268+ e . stopPropagation ( ) ;
269+ handleCancelEdit ( ) ;
270+ }
268271 } }
269272 />
270273 < Button
You can’t perform that action at this time.
0 commit comments