aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-24 01:11:23 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-24 01:11:23 -0400
commit568a3907a1277259eb9a0a5ae62cfcf5d7e60bf2 (patch)
tree352f6744d577baf65761664a7d22413725d80fa6 /src
parentdcfc5d77779117616503c31fc03f36841e25a3f9 (diff)
Fixed firefox user select stuff
Made repl multi-line
Diffstat (limited to 'src')
-rw-r--r--src/client/views/Main.scss3
-rw-r--r--src/debug/Repl.tsx6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/Main.scss b/src/client/views/Main.scss
index 385298e18..57a53c999 100644
--- a/src/client/views/Main.scss
+++ b/src/client/views/Main.scss
@@ -15,6 +15,9 @@ body {
div {
user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
}
#dash-title {
diff --git a/src/debug/Repl.tsx b/src/debug/Repl.tsx
index 16aef1925..ef00ed466 100644
--- a/src/debug/Repl.tsx
+++ b/src/debug/Repl.tsx
@@ -10,12 +10,12 @@ class Repl extends React.Component {
@observable executedCommands: { command: string, result: any }[] = [];
- onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ onChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
this.text = e.target.value;
}
onKeyDown = (e: React.KeyboardEvent) => {
- if (e.key === "Enter") {
+ if (e.ctrlKey && e.key === "Enter") {
const script = CompileScript(this.text, { addReturn: true, typecheck: false });
if (!script.compiled) {
this.executedCommands.push({ command: this.text, result: "Compile Error" });
@@ -49,7 +49,7 @@ class Repl extends React.Component {
<div style={{ verticalAlign: "bottom" }}>
{this.commands}
</div>
- <input style={{ width: "100%", position: "absolute", bottom: "0px" }} value={this.text} onChange={this.onChange} onKeyDown={this.onKeyDown} />
+ <textarea style={{ width: "100%", position: "absolute", bottom: "0px" }} value={this.text} onChange={this.onChange} onKeyDown={this.onKeyDown} />
</div>
);
}