fix: several smaller improvements
This commit is contained in:
@@ -92,7 +92,7 @@ export function CodeEditor({
|
||||
}, [value, textareaId])
|
||||
|
||||
return (
|
||||
<div ref={containerRef} className="code-editor" style={{ minHeight: 0 }}>
|
||||
<div ref={containerRef} className="code-editor min-h-0 h-full overflow-auto" style={{ minHeight: 0 }}>
|
||||
<Editor
|
||||
value={value}
|
||||
onValueChange={handleValueChange}
|
||||
|
||||
@@ -75,11 +75,14 @@ export function BaseNode({
|
||||
data-selected={selected}
|
||||
data-path-role={connectionPathRole ?? undefined}
|
||||
style={appliedStyle}
|
||||
tabIndex={0}
|
||||
tabIndex={selected ? 0 : -1}
|
||||
{...props}
|
||||
>
|
||||
<div
|
||||
className="min-h-0 flex-1 flex flex-col overflow-hidden"
|
||||
className={cn(
|
||||
"min-h-0 flex-1 flex flex-col overflow-hidden",
|
||||
!selected && "pointer-events-none",
|
||||
)}
|
||||
style={{ contain: "layout" }}
|
||||
>
|
||||
{children}
|
||||
@@ -96,7 +99,9 @@ export function BaseNode({
|
||||
handleClassName="base-node-resize-handle nodrag nopan"
|
||||
/>
|
||||
)}
|
||||
{!isFullscreenInstance && handles}
|
||||
{!isFullscreenInstance && (
|
||||
<div className={cn(!selected && "pointer-events-none")}>{handles}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -198,7 +203,7 @@ export function BaseNodeContent({
|
||||
return (
|
||||
<div
|
||||
data-slot="base-node-content"
|
||||
className={cn("min-h-0 flex-1 flex flex-col overflow-auto", className)}
|
||||
className={cn("min-h-0 flex-1 flex flex-col", className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -307,7 +307,7 @@ function ConfigNodeComponent({ id, data, width, height, selected }: Props) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div ref={editorContainerRef as React.RefObject<HTMLDivElement>} className="min-h-0 flex-1 w-full nodrag nopan overflow-auto border-t border-input" style={{ minHeight: editorHeight }}>
|
||||
<div ref={editorContainerRef as React.RefObject<HTMLDivElement>} className="min-h-0 flex-1 w-full nodrag nopan overflow-hidden border-t border-input" style={{ minHeight: editorHeight }}>
|
||||
<CodeEditor
|
||||
textareaId={editorId}
|
||||
value={content}
|
||||
|
||||
Reference in New Issue
Block a user