iced icon indicating copy to clipboard operation
iced copied to clipboard

Button prevents scrollable touch scrolling

Open iamsix opened this issue 11 months ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [x] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

When filling a scrollable entirely with a column of buttons the width of the scrollable, it's impossible to touch-scroll that scrollable since the button appears to consume the touch event before the scrollable gets it. Note mouse scrollwheel scrolling does work properly however.

I was trying to use this to approximate something like android's ListView where each item in the list is clickable.

Basic example testcase: https://gist.github.com/iamsix/dabd737e2dfa2f81b23c61353f6f3b8f

What is the expected behavior?

The scrollable should still function with touch scrolling.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

iamsix avatar Aug 05 '23 06:08 iamsix

Having the same issue, scrolling works "sometimes" then I figured out that it's working if you hit the padding between the buttons

MarcusGrass avatar Aug 09 '23 09:08 MarcusGrass

ahh, I think I get what you mean, drag scroll via grabbing a button and scrolling up or down is not working. and yeah I doubt it would since in this case a button is what you pressed. best way to solve this is probably make the scrollbar itself wider so its easier to touch with the finger on screen. Not sure there is much you can do on this currently...

genusistimelord avatar Aug 11 '23 18:08 genusistimelord