Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix PasswordType behavior #1128

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ internal interface SkikoUITextInputTraits {

}

internal object EmptyInputTraits : SkikoUITextInputTraits

internal fun getUITextInputTraits(currentImeOptions: ImeOptions?) =
object : SkikoUITextInputTraits {
override fun keyboardType(): UIKeyboardType =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ internal class UIKitTextInputService(
currentImeActionHandler = null
hideSoftwareKeyboard()

textUIView?.inputTraits = EmptyInputTraits
textUIView?.input = null
textUIView?.let { view ->
mainScope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package androidx.compose.ui.window

import androidx.compose.ui.platform.EmptyInputTraits
import androidx.compose.ui.platform.IOSSkikoInput
import androidx.compose.ui.platform.SkikoUITextInputTraits
import androidx.compose.ui.platform.TextActions
Expand Down Expand Up @@ -80,7 +81,7 @@ internal class IntermediateTextInputUIView(
private var _inputDelegate: UITextInputDelegateProtocol? = null
var input: IOSSkikoInput? = null
private var _currentTextMenuActions: TextActions? = null
var inputTraits: SkikoUITextInputTraits = object : SkikoUITextInputTraits {}
var inputTraits: SkikoUITextInputTraits = EmptyInputTraits

override fun canBecomeFirstResponder() = true

Expand Down