mirror of
https://github.com/bitwarden/android.git
synced 2025-12-10 08:35:05 -06:00
[PM-27869] fix/[PM-26241] : draw out keyboard on talkback click (#6129)
This commit is contained in:
parent
d81b0005ee
commit
621f97d161
@ -25,6 +25,7 @@ import androidx.compose.ui.test.onSiblings
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.compose.ui.test.performScrollTo
|
||||
import androidx.compose.ui.test.performTextInput
|
||||
import androidx.compose.ui.test.performTextReplacement
|
||||
import androidx.compose.ui.test.performTouchInput
|
||||
import androidx.compose.ui.test.swipeRight
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
@ -973,7 +974,7 @@ class GeneratorScreenTest : BitwardenComposeTest() {
|
||||
composeTestRule
|
||||
.onNodeWithText("Word separator")
|
||||
.performScrollTo()
|
||||
.performTextInput("a")
|
||||
.performTextReplacement("a")
|
||||
|
||||
verify {
|
||||
viewModel.trySendAction(
|
||||
|
||||
@ -1266,7 +1266,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
|
||||
verify {
|
||||
viewModel.trySendAction(
|
||||
VaultAddEditAction.ItemType.LoginType.UriValueChange(
|
||||
UriItem(id = "TestId", uri = "TestURI", match = null, checksum = null),
|
||||
UriItem(id = "TestId", uri = "URITest", match = null, checksum = null),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ import androidx.compose.ui.platform.TextToolbar
|
||||
import androidx.compose.ui.semantics.CustomAccessibilityAction
|
||||
import androidx.compose.ui.semantics.customActions
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.TextRange
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
@ -278,14 +279,16 @@ fun BitwardenTextField(
|
||||
val isDropDownExpanded = filteredAutoCompleteList.isNotEmpty() && hasFocused
|
||||
ExposedDropdownMenuBox(
|
||||
expanded = isDropDownExpanded,
|
||||
onExpandedChange = { hasFocused = false },
|
||||
onExpandedChange = {
|
||||
hasFocused = !hasFocused
|
||||
focusRequester.requestFocus()
|
||||
},
|
||||
modifier = modifier.defaultMinSize(minHeight = 60.dp),
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.onGloballyPositioned { widthPx = it.size.width }
|
||||
.onFocusEvent { focusState -> hasFocused = focusState.hasFocus }
|
||||
.focusRequester(focusRequester)
|
||||
.cardStyle(
|
||||
cardStyle = cardStyle,
|
||||
paddingTop = 6.dp,
|
||||
@ -377,8 +380,14 @@ fun BitwardenTextField(
|
||||
.nullableTestTag(tag = textFieldTestTag)
|
||||
.menuAnchor(type = ExposedDropdownMenuAnchorType.PrimaryEditable)
|
||||
.fillMaxWidth()
|
||||
.focusRequester(focusRequester)
|
||||
.onFocusChanged { focusState ->
|
||||
focused = focusState.isFocused
|
||||
if (focused) {
|
||||
textFieldValueState = textFieldValueState.copy(
|
||||
selection = TextRange(textFieldValueState.text.length),
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
supportingContent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user