Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3357851
D6053.id20175.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6053.id20175.diff
View Options
diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -156,6 +156,20 @@
'none',
);
}
+
+ if (
+ this.props.suggestedUsers.length === 0 &&
+ this.props.inputState.typeaheadState.frozenSuggestedUsers.length !== 0
+ ) {
+ this.props.inputState.setTypeaheadState({ frozenSuggestedUsers: [] });
+ } else if (
+ this.props.suggestedUsers.length !== 0 &&
+ this.props.inputState.typeaheadState.frozenSuggestedUsers.length === 0
+ ) {
+ this.props.inputState.setTypeaheadState({
+ frozenSuggestedUsers: this.props.suggestedUsers,
+ });
+ }
}
static unassignedUploadIDs(
@@ -350,7 +364,9 @@
inputState={this.props.inputState}
textarea={this.textarea}
matchedStrings={this.props.typeaheadMatchedStrings}
- suggestedUsers={this.props.suggestedUsers}
+ suggestedUsers={
+ this.props.inputState.typeaheadState.frozenSuggestedUsers
+ }
/>
);
}
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -144,6 +144,7 @@
textCursorPositions: {},
typeaheadState: {
canBeVisible: false,
+ frozenSuggestedUsers: [],
moveChoiceUp: null,
moveChoiceDown: null,
close: null,
diff --git a/web/input/input-state.js b/web/input/input-state.js
--- a/web/input/input-state.js
+++ b/web/input/input-state.js
@@ -8,7 +8,7 @@
type MediaMissionStep,
} from 'lib/types/media-types';
import type { RawTextMessageInfo } from 'lib/types/messages/text';
-import type { ThreadInfo } from 'lib/types/thread-types';
+import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';
export type PendingMultimediaUpload = {
localID: string,
@@ -36,6 +36,7 @@
export type TypeaheadState = {
+canBeVisible: boolean,
+ +frozenSuggestedUsers: $ReadOnlyArray<RelativeMemberInfo>,
+moveChoiceUp: ?() => void,
+moveChoiceDown: ?() => void,
+close: ?() => void,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 1:57 AM (17 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577982
Default Alt Text
D6053.id20175.diff (2 KB)
Attached To
Mode
D6053: [web] Keyboard support for typeahead [13/13] - Freeze users list when typeahead is visible.
Attached
Detach File
Event Timeline
Log In to Comment