improve focus setting and keystrokes
This commit is contained in:
@@ -450,6 +450,7 @@ function TransferDataInputModal(
|
||||
}
|
||||
</span>
|
||||
<input
|
||||
on:enter={fileTransferViewModel.prepareReceivingData}
|
||||
bind:value={
|
||||
fileTransferViewModel.receivingTransferChannel
|
||||
}
|
||||
@@ -467,6 +468,7 @@ function TransferDataInputModal(
|
||||
}
|
||||
</span>
|
||||
<input
|
||||
on:enter={fileTransferViewModel.prepareReceivingData}
|
||||
bind:value={
|
||||
fileTransferViewModel.receivingTransferKey
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import SearchViewModel from "../../ViewModel/Utility/searchViewModel";
|
||||
import { StringToOption } from "../Components/option";
|
||||
import { v4 } from "uuid";
|
||||
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
||||
import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel";
|
||||
import { MessageReactionFilterButton } from "../Components/messageReactionFilterButton";
|
||||
import { ReactionSymbols } from "../../Model/Chat/chatModel";
|
||||
import { setFocusWithDelay } from "../utility";
|
||||
|
||||
export function MessageFilterModal<T>(
|
||||
coreViewModel: CoreViewModel,
|
||||
@@ -18,6 +16,8 @@ export function MessageFilterModal<T>(
|
||||
() => messagePageViewModel.reactionFilter.value == undefined,
|
||||
);
|
||||
|
||||
messagePageViewModel.isFilterModalOpen.subscribe(setFocusWithDelay);
|
||||
|
||||
return (
|
||||
<div class="modal" toggle:open={messagePageViewModel.isFilterModalOpen}>
|
||||
<div>
|
||||
@@ -30,6 +30,7 @@ export function MessageFilterModal<T>(
|
||||
</h2>
|
||||
<div class="flex-row width-input">
|
||||
<input
|
||||
id="focused"
|
||||
placeholder={
|
||||
coreViewModel.translations.general.searchLabel
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import SearchViewModel from "../../ViewModel/Utility/searchViewModel";
|
||||
import { StringToOption } from "../Components/option";
|
||||
import { v4 } from "uuid";
|
||||
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
||||
import { setFocusWithDelay } from "../utility";
|
||||
|
||||
export function SearchModal<T>(
|
||||
coreViewModel: CoreViewModel,
|
||||
@@ -18,6 +19,8 @@ export function SearchModal<T>(
|
||||
|
||||
const suggestionId = v4();
|
||||
|
||||
isOpen.subscribe(setFocusWithDelay);
|
||||
|
||||
return (
|
||||
<div class="modal" toggle:open={isOpen} extended>
|
||||
<div>
|
||||
@@ -25,6 +28,7 @@ export function SearchModal<T>(
|
||||
<h2>{headline}</h2>
|
||||
<div class="flex-row width-input">
|
||||
<input
|
||||
id="focused"
|
||||
placeholder={
|
||||
coreViewModel.translations.general.searchLabel
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user