Yesterday, I faced an issue detecting clicks in a ...
# feed
b
Yesterday, I faced an issue detecting clicks in a TextField. After fixing the problem, I wrote a Medium article on how to detect clicks in a TextField. https://medium.com/@binod.basnet777/how-to-detect-clicks-on-a-jetpack-compose-textfield-f77182bf8ebf
🙌 1
s
Just read the article, and while I think everything about it is correct, my experience on desktop (while I was trying to answer your question) is that the
interactionSource
no longer emits events the moment there's text in the field. It feels like a bug in Compose Desktop, but I'm not quite sure of that.
b
I didn't notice it at first, but I actually want to show a bottom sheet when I click on the TextField. I didn't check for the click event when there was text. However, every time I click on the TextField, regardless of whether there is selected text or not, the click event is triggered. I confirmed this using debug mode.