Is it expected that a text field (BasicTextField) ...
# compose
n
Is it expected that a text field (BasicTextField) stops working (no keyboard, no focus) if the parent has
clickable(enabled=false, onClick=...)
? This used to work.
c
That makes sense to me. If you want focus while not being editable, try readOnly = true instead of enabled = false.
n
The clickable modifier is applied to a parent, up in the hierarchy, unrelated to the text field. You can read this the other way: applying
clickable(enabled=false)
to a node, breaks all text fields contained in it.
c
oh sorry. i missed the "if the parent". I read it as "if the composable" Sorry!
z
Please file a bug
n
Turns out it’s considered intended behavior! https://issuetracker.google.com/issues/215403275 Compose is treating
clickable(enabled=false)
as a signal that the element is disabled (kind of like View.isEnabled), which seems weird to me. If I just disable node own clicks, it should not become a black hole for all interactions.
☝️ 1
z
Huh, that's really surprising that it would even disable focus
☝️ 1