Skip to content

Commit 577ecd6

Browse files
committed
SmartUrlInput [nfc]: Comment on a partially debugged React Nav bug
1 parent e999399 commit 577ecd6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/common/SmartUrlInput.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ export default function SmartUrlInput(props: Props): Node {
8686
useFocusEffect(
8787
useCallback(() => {
8888
if (textInputRef.current) {
89+
// Sometimes the effect of this `.focus()` is immediately undone
90+
// (the keyboard is closed) by a Keyboard.dismiss() from React
91+
// Navigation's internals. Seems like a complex bug, but the symptom
92+
// isn't terrible, it just means that on back-navigating to this
93+
// screen, sometimes the keyboard flicks open then closed, instead
94+
// of just opening. Shrug. See
95+
// https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/realm-input/near/1346690
96+
//
8997
// `.current` is not type-checked; see definition.
9098
textInputRef.current.focus();
9199
}

0 commit comments

Comments
 (0)