ng-chat
ng-chat copied to clipboard
Mobile keyboard problem
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
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!
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!
Hi @rpaschoal, @LuckyGStar Thank you for your quick response, i will check and let you know.
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
Same problem here. 😟
@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.