mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-11 13:23:06 +01:00
Make cmdinput prompt smaller, properly handle select events to take priority over onclick (#558)
This commit is contained in:
parent
37e56acf63
commit
af7cc866d3
@ -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);
|
||||
|
@ -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<{}, {}> {
|
||||
</Button>
|
||||
</div>
|
||||
</If>
|
||||
<div key="base-cmdinput" className="base-cmdinput" onClick={this.baseCmdInputClick}>
|
||||
<div
|
||||
key="base-cmdinput"
|
||||
className="base-cmdinput"
|
||||
onClick={this.baseCmdInputClick}
|
||||
onSelect={this.baseCmdInputClick}
|
||||
>
|
||||
<div className="cmdinput-actions">
|
||||
<If condition={numRunningLines > 0}>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user