flutter_chat_ui icon indicating copy to clipboard operation
flutter_chat_ui copied to clipboard

Disable Scroll of Text Content

Open Immortalin opened this issue 2 years ago • 6 comments

General

What bug do you experience? 🐞

When the message text is longer than the screen size, it starts scrolling and capturing the cursor

How can it be reproduced? 🤔

  1. Chat view, globally set ios style bouncy scroll physics (also occurs with material, but effect is more obvious with iOS scroll physics) 2) Have a very long text message 3) both the chat list and the text inside the chat can be scrolled. The text message inside the chat should not be scrollable and it should not be capturing the focus preventing scroll of chat list when the user's thumb is on the message bubble.

What behavior is expected? 💡

Text in chat bubble should not scroll, swiping up or down should ONLY scroll the chatlist.


Environment info

Please specify the flutter, flutter-chat-ui versions.

flutter: ... flutter-chat-ui: ...

flutter doctor -v output 👇


Flutter (Channel stable, 3.10.6, on Ubuntu 22.04.2 LTS

Platform

Web, occurs on all touchscreen devices


Additional context

N/A

Immortalin avatar Jul 29 '23 04:07 Immortalin

Thanks for the report, will look into that

demchenkoalex avatar Aug 02 '23 06:08 demchenkoalex

@demchenkoalex any luck?

Immortalin avatar Aug 08 '23 17:08 Immortalin

I didn't work on the package yet, lots of work at my day to day job right now

demchenkoalex avatar Aug 09 '23 05:08 demchenkoalex

you can submit a PR if you find the issue, will be faster for me to merge and release

demchenkoalex avatar Aug 09 '23 05:08 demchenkoalex

I found the bug, the issue is with SelectableText as it contains an implicit scroll behaviour. Consider adding an option to pass NeverScrollableScrollPhysics to this and the upstream flutter_parsed_text library also needs to be updated too

Immortalin avatar Aug 09 '23 07:08 Immortalin

Need to keep it open to not forget :)

demchenkoalex avatar Aug 09 '23 07:08 demchenkoalex

not a feature anymore in v2 - user can provide their own implementation if needed

demchenkoalex avatar Oct 29 '24 20:10 demchenkoalex