ng-chat icon indicating copy to clipboard operation
ng-chat copied to clipboard

Mobile keyboard problem

Open tushar009 opened this issue 5 years ago • 6 comments

Chat box is hide when mobile keyboard is open. For your reference please open the below link into the mobile https://angular-pfq4dv.stackblitz.io

tushar009 avatar Nov 06 '19 05:11 tushar009

Hi @tushar009 ,

Thank you for providing a reproducible link. It seems like a bug to me. This feature was recently introduced by @LuckyGStar so I'm wondering if @LuckyGStar would be keen to take a look into it?

Cheers!

rpaschoal avatar Nov 06 '19 17:11 rpaschoal

Hi @tushar009 .

Please refer this pull request. In mobile cases, chat widget is designed to be hidden.

https://github.com/rpaschoal/ng-chat/pull/128

Please let me know if you have any questions.

Cheers!

LuckyGStar avatar Nov 06 '19 18:11 LuckyGStar

Hi @rpaschoal, @LuckyGStar Thank you for your quick response, i will check and let you know.

tushar009 avatar Nov 07 '19 00:11 tushar009

Hi @LuckyGStar

I have enabled the flag "viewportWidthCalculationEnabled" true still, it is not working. Steps

  • select the user from the friend list
  • when user chat box is open corresponding the mobile keyboard is opened after that user chat box is hide.

Please look the below link https://stackblitz.com/edit/angular-qixwan?file=src%2Fapp%2Fapp.component.html

Note - Please be open link "https://angular-qixwan.stackblitz.io/" into the mobile browse

tushar009 avatar Nov 07 '19 02:11 tushar009

Same problem here. 😟

floxcristian avatar Aug 28 '20 17:08 floxcristian

ng-chat code

@rpaschoal, After looking closer at this bug and the code it appears that the bug is coming from the NormalizeWindows() function inside ng-chat component. When the message input on a chat has focus the mobile keyboard will appear. This triggers a resize event and the subsequent NormalizeWindows() function. Depending on the user's screen size the mobile keyboard will take up most of the screen space and the function will calculate that there isn't enough room for the chat and force it to close open chats.

Commenting out the problem line of code on 239 removed the bug. Perhaps adding isViewportOnMobileEnabled to the conditional to not allow it to splice if enabled for an official fix to this bug.

LegendaryJanitor avatar Dec 29 '21 02:12 LegendaryJanitor