From 1745feaae5fbf5d794c8d692bd3f6b8eacd3d7fc Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Tue, 14 Apr 2020 19:01:58 -0400
Subject: fixed editing button click scripts

---
 src/client/views/nodes/ScriptingBox.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/ScriptingBox.tsx')

diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 8a1d270b3..a257898ab 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -75,9 +75,9 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
         />;
         return (
             <div className="scriptingBox-outerDiv"
-                onPointerDown={e => this.props.isSelected(true) && e.stopPropagation()}
                 onWheel={e => this.props.isSelected(true) && e.stopPropagation()}>
-                <div className="scriptingBox-inputDiv" >
+                <div className="scriptingBox-inputDiv"
+                    onPointerDown={e => this.props.isSelected(true) && e.stopPropagation()} >
                     <textarea className="scriptingBox-textarea"
                         placeholder="write your script here"
                         onChange={e => this.rawScript = e.target.value}
@@ -87,6 +87,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
                     <div className="scriptingBox-errorMessage" style={{ background: this._errorMessage ? "red" : "" }}>{this._errorMessage}</div>
                     <div className="scriptingBox-params" >{params}</div>
                 </div>
+                {this.rootDoc.layout === "layout" ? <div></div> : (null)}
                 <div className="scriptingBox-toolbar">
                     <button className="scriptingBox-button" onPointerDown={e => { this.onCompile(); e.stopPropagation(); }}>Compile</button>
                     <button className="scriptingBox-button" onPointerDown={e => { this.onRun(); e.stopPropagation(); }}>Run</button>
-- 
cgit v1.2.3-70-g09d2

