We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79d649d commit 7207b3cCopy full SHA for 7207b3c
arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx
@@ -112,15 +112,16 @@ export class SerialMonitorSendInput extends React.Component<
112
override render(): React.ReactNode {
113
const inputClassName = this.inputClassName;
114
const placeholder = this.placeholder;
115
+ const readOnly = Boolean(inputClassName);
116
return (
117
<input
118
ref={this.setRef}
119
type="text"
120
className={`theia-input ${inputClassName}`}
- readOnly={Boolean(inputClassName)}
121
+ readOnly={readOnly}
122
placeholder={placeholder}
123
title={placeholder}
- value={this.state.text}
124
+ value={readOnly ? '' : this.state.text} // always show the placeholder if cannot edit the <input>
125
onChange={this.onChange}
126
onKeyDown={this.onKeyDown}
127
/>
0 commit comments