diff --git a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt index b6dc9db96f..7227920a0b 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt @@ -1,5 +1,6 @@ package org.dhis2.usescases.teidashboard +import android.annotation.SuppressLint import androidx.compose.ui.test.junit4.createComposeRule import androidx.test.ext.junit.runners.AndroidJUnit4 import dhis2.org.analytics.charts.data.ChartType @@ -226,6 +227,7 @@ class TeiDashboardTest : BaseTest() { } } + @SuppressLint("IgnoreWithoutReason") @Ignore @Test fun shouldOpenEventEditAndSaveSuccessfully() { diff --git a/form/src/main/java/org/dhis2/form/ui/provider/inputfield/FieldProvider.kt b/form/src/main/java/org/dhis2/form/ui/provider/inputfield/FieldProvider.kt index 6106f2072f..b34f4b071e 100644 --- a/form/src/main/java/org/dhis2/form/ui/provider/inputfield/FieldProvider.kt +++ b/form/src/main/java/org/dhis2/form/ui/provider/inputfield/FieldProvider.kt @@ -27,6 +27,7 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.TextRange import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.TextFieldValue +import kotlinx.coroutines.delay import kotlinx.coroutines.launch import org.dhis2.commons.resources.ResourceManager import org.dhis2.form.extensions.autocompleteList @@ -79,14 +80,16 @@ fun FieldProvider( .onSizeChanged { intSize -> visibleArea = Rect( size = Size(intSize.width.toFloat(), intSize.height.toFloat()), - offset = Offset(0f, 20f), + offset = Offset(0f, 200f), ) } .onFocusChanged { if (it.isFocused && !fieldUiModel.focused) { scope.launch { - bringIntoViewRequester.bringIntoView(visibleArea) fieldUiModel.onItemClick() + + delay(10) + bringIntoViewRequester.bringIntoView(visibleArea) } } }