From b18d4d2b9a4a624e61116642d4dbfe9a53437d0c Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 12 Mar 2021 22:18:10 -0500 Subject: prevent anything but Docs from being written to offScreenTabs. fixed tabs to activate an unrendered tab when it is uncovered for the first time. --- src/client/views/nodes/KeyValueBox.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx index 8acf4081c..383650e89 100644 --- a/src/client/views/nodes/KeyValueBox.tsx +++ b/src/client/views/nodes/KeyValueBox.tsx @@ -61,10 +61,7 @@ export class KeyValueBox extends React.Component { const options: ScriptOptions = { addReturn: true, params: { this: "Doc", _last_: "any" }, editable: false }; if (dubEq) options.typecheck = false; const script = CompileScript(value, options); - if (!script.compiled) { - return undefined; - } - return { script, type: dubEq, onDelegate: eq }; + return !script.compiled ? undefined : { script, type: dubEq, onDelegate: eq }; } public static ApplyKVPScript(doc: Doc, key: string, kvpScript: KVPScript, forceOnDelegate?: boolean): boolean { @@ -100,9 +97,7 @@ export class KeyValueBox extends React.Component { e.stopPropagation(); } } - onPointerWheel = (e: React.WheelEvent): void => { - e.stopPropagation(); - } + onPointerWheel = (e: React.WheelEvent): void => e.stopPropagation(); rowHeight = () => 30; -- cgit v1.2.3-70-g09d2