From af7cc866d30d09c0394b7b4202b6fe934856b5b5 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Mon, 8 Apr 2024 13:15:33 -0700 Subject: [PATCH] Make cmdinput prompt smaller, properly handle select events to take priority over onclick (#558) --- src/app/workspace/cmdinput/cmdinput.less | 1 + src/app/workspace/cmdinput/cmdinput.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/workspace/cmdinput/cmdinput.less b/src/app/workspace/cmdinput/cmdinput.less index 66785d4e..fd3489c0 100644 --- a/src/app/workspace/cmdinput/cmdinput.less +++ b/src/app/workspace/cmdinput/cmdinput.less @@ -49,6 +49,7 @@ .base-cmdinput { position: relative; + cursor: text; // Rather than apply the padding to the whole container, we will apply it to the inner contents directly. // This is more fragile, but allows us to capture a larger target area for the individual components. --padding-top: var(--termpad); diff --git a/src/app/workspace/cmdinput/cmdinput.tsx b/src/app/workspace/cmdinput/cmdinput.tsx index 002116d8..df763774 100644 --- a/src/app/workspace/cmdinput/cmdinput.tsx +++ b/src/app/workspace/cmdinput/cmdinput.tsx @@ -62,7 +62,7 @@ class CmdInput extends React.Component<{}, {}> { } @boundMethod - baseCmdInputClick(e: React.MouseEvent): void { + baseCmdInputClick(e: React.SyntheticEvent): void { if (this.promptRef.current != null) { if (this.promptRef.current.contains(e.target)) { return; @@ -231,7 +231,12 @@ class CmdInput extends React.Component<{}, {}> { -
+
0}>