fix: escape not working during stream configure
This commit is contained in:
@@ -178,7 +178,13 @@ export function ComposeOverlay({
|
|||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
const currentStep = stepRef.current;
|
const currentStep = stepRef.current;
|
||||||
|
|
||||||
if (currentStep === "typing" || currentStep === "configuring") return;
|
if (currentStep === "typing" || currentStep === "configuring") {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.preventDefault();
|
||||||
|
cancel();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const target = e.target as HTMLElement;
|
const target = e.target as HTMLElement;
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ export function ConfigureStreamStep({
|
|||||||
<Label className="mb-1 text-xs text-white/50">Stream name</Label>
|
<Label className="mb-1 text-xs text-white/50">Stream name</Label>
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
|
autoFocus
|
||||||
value={name}
|
value={name}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setName(e.target.value);
|
setName(e.target.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user