Buttons are not clickable until the TextInputField receives focus. #44508
Labels
Component: Button
Component: TextInput
Related to the TextInput component.
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Needs: Version Info
Description
The issue is located on a screen that encompasses an external chat service product, where it contains a View responsible for exchanging messages between the agent and the user, and a View that displays a TextInputField and a Button.
During the initial loading of this screen, all buttons on it become static (without performing any action when tapped). To "unfreeze" these buttons, the user must tap on the text editing field (causing the field to receive focus). Immediately after this action, all buttons become clickable again.
Below is the code of the Views that compose the screen:
`private var ChatFeed: some View {
VStack {
if isLoading {
ProgressView("Carregando mensagens...")
.frame(maxWidth: .infinity, maxHeight: .infinity)
.edgesIgnoringSafeArea(.all)
}
ChatFeedList
.onAppear {
viewModel.checkIfWithinBusinessHours(completion: { isWithinBusinessHours, isBusinessHoursConfigured in
self.shouldHideBusinessHoursBanner = !isBusinessHoursConfigured
self.isWithinBusinessHours = isWithinBusinessHours
businessHoursMessage = isWithinBusinessHours ? "You are within business hours" : "You are not within business hours"
isLoading = false
})
}`
` private var ButtonsBottomBar: some View {
HStack {
VStack(spacing: 12) {
}`
` private var ChatBottomBar: some View {
HStack {
CustomTextField(placeholder: Text("Escreva sua mensagem"), text: $messageInputText)
}`
Steps to reproduce
It's an internal application.
React Native Version
0.66
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
It's an internal application.
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: