jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
568 stars 48 forks source link

Disable click on internal textview #19

Closed ale-groundcloud closed 2 years ago

ale-groundcloud commented 2 years ago

Is it possible to disable the click event on the Internal textview?, I'm using this view on a list and the users can't click on the area where the markdown text is added. If possible the consumer should be able to control events with the clickable modifier or having a click block that receives the text on the clicked area.

jeziellago commented 2 years ago

Hello @ale-groundcloud,

I'm using this view on a list and the users can't click on the area where the markdown text is added.

Are you using links and the click doesn't work?

ale-groundcloud commented 2 years ago

It's the opposite, there are no links and the textview consumes the events, not allowing the event to go to the view behind it

jeziellago commented 2 years ago

Got it! I guess these changes will solve it. https://github.com/jeziellago/compose-markdown/commit/8cfa5a531038f2f65237e32add93aadb19d21dc6

ale-groundcloud commented 2 years ago

Will try once the new version is out 😄

jeziellago commented 2 years ago

Try it with 0.2.8

ale-groundcloud commented 2 years ago

Unfortunately the fix doesn't work, check the view hierarchy and you will see that the textviews are consuming the click, I think it's something related to accessibility

ale-groundcloud commented 2 years ago

you can check by adding the view to a clickable parent. When you click on the textview area, the event will be consumed and not sent to the parent.

jeziellago commented 2 years ago

@ale-groundcloud Try the version 0.2.9. I found the problem and did solve it. I hope it helps you.