We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Image message gets squished by keyboard on SfChat

Hello, 


After sending a message, if I tap in the edit field to start typing another message, the keyboard will show up and squish the image like below:

The image returns to normal only after dismissing the keyboard scrolling through the list and returning back to the last message.



att.



8 Replies

SV Suja Venkatesan Syncfusion Team October 5, 2022 10:04 AM

Hi Wantf,


Regarding scenario “Image message gets squished by keyboard on SfChat


We would like to inform you that we require additional information in order to proceed with this. Could please share the below requested details

  • SfChat related code snippets
  • SfChat and Xamarin.Forms version
  • iOS version

Meanwhile,we will try to replicate the reported scenario in simple SfChat sample on our end and update further details on or before October 7, 2022. We appreciate your patience and understanding.


Regards,

Suja



WA Wanft October 5, 2022 10:54 AM

Hi, follow requested info: 

Xamarin.Forms - 5.0.0.2515 

SfChat - 20.3.0.47 

iOS - 15.5

            //chat

            SfChat chat = new SfChat() {

                ShowIncomingMessageTimestamp = true,

                ShowOutgoingMessageTimestamp = true,

                IncomingMessageTimestampFormat = "MM/dd hh:mm tt",

                OutgoingMessageTimestampFormat = "MM/dd hh:mm tt",

                ShowOutgoingMessageAvatar = true,

                MessageSpacing = 5,

                MessageShape = MessageShape.TearDrop,

                ShowAttachmentButton = true,

                BackgroundColor = Color.White,

                AllowSwiping = true,

                BindingContext = this,

                ShowKeyboardAlways = false

            };

            //swipe template

            chat.RightSwipeViewTemplate = new DataTemplate(() => {

                Grid grid = new() {

                    BackgroundColor = Color.FromHex("#DC595F"),

                    Children = {

                        new Label () {

                            BackgroundColor = Color.Transparent,

                            Text = "\uf1f8",

                            FontFamily = "FASolid",

                            FontSize = 24,

                            TextColor = Color.White,

                            HorizontalOptions = LayoutOptions.Center,

                            VerticalOptions = LayoutOptions.Center

                        }

                    }

                };


                TapGestureRecognizer tapGesture = new() { NumberOfTapsRequired = 1 };


                tapGesture.SetBinding(TapGestureRecognizer.CommandProperty, new Binding("DeleteMessageCommand", source:this));

                grid.GestureRecognizers.Add(tapGesture);


                return grid;

            });

            //bindings

            chat.SetBinding(SfChat.MessagesProperty, nameof(Messages));

            chat.SetBinding(SfChat.CurrentUserProperty, nameof(CurrentAuthor));

            chat.SetBinding(SfChat.SendMessageCommandProperty, nameof(SendMessageCommand));

            chat.SetBinding(SfChat.AttachmentButtonCommandProperty, nameof(AddAttachmentCommand));

            //behaviors

            EventToCommandBehavior swipeStartedBehavior = new () { EventName = "SwipeStarted" };

            EventToCommandBehavior swipeEndedBehavior = new() { EventName = "SwipeEnded" };


            swipeStartedBehavior.SetBinding(EventToCommandBehavior.CommandProperty, nameof(SwipeStartedCommand));

            swipeEndedBehavior.SetBinding(EventToCommandBehavior.CommandProperty, nameof(SwipeEndedCommand));


            chat.Behaviors.Add(swipeStartedBehavior);

            chat.Behaviors.Add(swipeEndedBehavior);


            ChatView = chat;



SV Suja Venkatesan Syncfusion Team October 6, 2022 09:43 AM

Hi Wanft,


We would like to let you know that we are able to replicate the reported scenario “Image messages squished by keyboard on SfChat” randomly when opening the keyboard after scrolling SfChat page . We have attached a sample which we used to check the reported scenario for your reference. Currently, we are validating the reported scenario in our source level. We will update you further details on or before October 10, 2022. Meanwhile, Could you please confirm whether you are facing the reported scenario as same as we mentioned here. We have also attached an illustration video for your reference.


Regards,

Suja


Attachment: Forum_ac844a4c.zip


WA Wanft October 6, 2022 09:49 AM

HI,


yup, that is the issue. Ty.


att.




SV Suja Venkatesan Syncfusion Team October 10, 2022 10:16 AM

Hi Wanft,


We have logged a bug report for the reported issue “Image gets compressed when Keyboard opened in SfChat". We will fix the issue and include the fix in our weekly nuget which is scheduled on
November 8, 2022. We will let you know once it is released with the fix. Soon we will share the bug report to track the status of the issue. We appreciate your patience until then.


Regards,

Suja




WA Wanft October 10, 2022 10:17 AM

Tyvm!


att.



SV Suja Venkatesan Syncfusion Team October 11, 2022 03:56 AM

Hi Wanft,


We would like to let you know that you can also track the status of the report from the below link.  


Feedback link: https://www.syncfusion.com/feedback/38318/image-gets-compressed-when-keyboard-opened-in-sfchat


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Suja



SV Suja Venkatesan Syncfusion Team October 21, 2022 04:42 AM

Hi Wanft,


We have fixed the reported issue “Image gets compressed when Keyboard opened in SfChat” and included the issue fix in our latest NuGet release update version 20.3.0.50 which is available for download (https://www.nuget.org/).   


We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.


Regards,

Suja


Loader.
Live Chat Icon For mobile
Up arrow icon