workflow-kotlin icon indicating copy to clipboard operation
workflow-kotlin copied to clipboard

Compose and `backPressedHandler` interfere with first touch event

Open rjrjr opened this issue 3 years ago • 0 comments
trafficstars

https://workflow-community.slack.com/archives/CHTFPR277/p1657276987100999

Noticing a really strange issue with BackStackScreen and Compose – given there is BackButtonScreen or BackHandler/backPressedHandler in the stack and I press back button, the UI seems to block the first touch event Not really sure if it's the best explanation, but a button gets pressed only works on a second tap, same with lists, etc

Did some more investigation, and I'm not seeing this issue when

  • using BackStackScreen as root rendering via WorkflowLayout
  • replacing BackStackScreen with a custom View-based Screen (Compose -> View -> Compose) So looks like this is really specific to Compose -> BackStackScreen -> Compose :thinking_face:

Same on both 1.7.1 and 1.8.0-beta04

@vgonda> Hmmmm. I wonder if we should be calling composeView.setBackHandler somewhere

rjrjr avatar Jul 08 '22 15:07 rjrjr