A fix for mobile phone - webchat v2
# 📖tutorials
w
Heeey there ! I spent a few minutes looking at this problem that many (many) people are talking about, in relation to the overflow that can occur on mobile, where you don't see the last message, with an inability to select choices for example https://cdn.discordapp.com/attachments/1274766710003466351/1274766710385414356/thumbnail_discord_post.jpg?ex=66c37283&is=66c22103&hm=ecc1105f082d84d43539fa3e6ac4b359c6b4ea98647b10af31eaa8324f2ab906&
--> Step 2, paste this code
Copy code
@media only screen and (max-width: 396px) {
  .bpMessageListScrollbarViewport{
    padding-bottom: 105px; 
  }
}
For the width of the viewport, keep something under 500px (default width of the webchat) Hoewever, if you want to change the width of your webchat (reduce it), you will have to reduce this max-width https://cdn.discordapp.com/attachments/1274766710003466351/1274766915264319569/image.png?ex=66c372b4&is=66c22134&hm=d2c466f114ec2265107a3f6bde841064c9f953e1c27ec061ae8258926080b3be&
And that's it ! you should be able to see the full conversation on mobile tell me if that helps 😉
Second fix : automatic zoom on the textarea on mobile just add this css :
Copy code
@media only screen and (max-width: 396px) {
   .bpComposerInput{font-size: 16px;}
}
same thing for the viewport widht ! 3rd : tip - change only the color of the outgoing messages (user's messages)
Copy code
[data-direction="outgoing"] > .bpMessageBlocksBubble > p {
color:red;
}
works with the same code but with incoming instead of outgoing
b
brokoooooooooooooo YOU ARE THE BESSTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
w
glad it actually helps !!
p
Thank you so much
Maybe you also knows a fix for: If i change the .bpMessageBlocksBubble color, the bot and the user text bubbel will both change to that color. Is there an why to do that seperatly?
b
@wooden-beard-40210 Thank you for the fix! The scrolling works on WordPress using Elementor, just need to adjust the padding-bottom to suit my case.
m
Hey @wooden-beard-40210! I tried your code however i don't understand why it's not working The chat is still using all the space available 🤔 https://cdn.discordapp.com/attachments/1274766710003466351/1276350682642907226/image.png?ex=66c935b4&is=66c7e434&hm=f5c044615fa757b335dd5ce2d5cb640a114fc94015d8bcaea5873f6bf3caeeef&
w
Did you actually try on a mobile phone? Otherwise , try to adjust the value of the view port for the media queries
m
" @media only screen and (max-width: 396px) { .bpMessageListScrollbarViewport { padding-bottom: 105px !important; } .bpComposerInput { font-size: 16px !important; } .bp-widget-webchat { max-width: 320px !important; margin: 0 auto !important; } } "
w
Weird It works fine for me with my code ..
a
your media query did the trick!! thank you so much. Okay, last questions, now i cant see the X and refresh button at the top of the chat. Any idea for that?
m
Yeah, I don't understand It looks like it change nothing I'll see if the CSS spreadsheet on the V1 isn't blocking something
3 Views