* 🐞Bug Fix: Bug_chat_height_issues_in_IOS * Removing extra margin in sidecar * 🐞 Fixing the viewport issue * 🚀 fixing the parent box size problem
This commit is contained in:
parent
a5553cf296
commit
3649c70872
3 changed files with 11 additions and 24 deletions
|
|
@ -12,13 +12,7 @@
|
|||
}
|
||||
|
||||
.live-chat {
|
||||
height: calc(100vh - 56px);
|
||||
|
||||
&.live-chat--iossafari {
|
||||
height: calc(100vh - 190px);
|
||||
}
|
||||
|
||||
overflow-y: hidden;
|
||||
height: calc(100 * var(--vh) - var(--header-height));
|
||||
}
|
||||
|
||||
.live-chat {
|
||||
|
|
@ -28,14 +22,10 @@
|
|||
|
||||
.chat {
|
||||
display: flex;
|
||||
height: calc(100vh - var(--header-height));
|
||||
height: calc(100 * var(--vh) - var(--header-height));
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
|
||||
&.chat--iossafari {
|
||||
height: calc(100vh - 201px);
|
||||
}
|
||||
}
|
||||
|
||||
.chat__channels {
|
||||
|
|
@ -297,7 +287,7 @@
|
|||
@media screen and (max-width: 426px) {
|
||||
padding: 10px;
|
||||
min-width: 50%;
|
||||
width: calc(100% - 16px);
|
||||
width: calc(100%);
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
margin-left: 0;
|
||||
|
|
|
|||
|
|
@ -1842,11 +1842,6 @@ export default class Chat extends Component {
|
|||
|
||||
render() {
|
||||
const { state } = this;
|
||||
const detectIOSSafariClass =
|
||||
navigator.userAgent.match(/iPhone/i) &&
|
||||
!navigator.userAgent.match('CriOS')
|
||||
? ' chat--iossafari'
|
||||
: '';
|
||||
let channelHeader = <div className="active-channel__header"> </div>;
|
||||
if (state.activeChannel) {
|
||||
channelHeader = (
|
||||
|
|
@ -1867,9 +1862,9 @@ export default class Chat extends Component {
|
|||
<div
|
||||
data-testid="chat"
|
||||
className={`chat chat--expanded
|
||||
${detectIOSSafariClass} chat--${
|
||||
state.videoPath ? 'video-visible' : 'video-not-visible'
|
||||
} chat--${
|
||||
chat--${
|
||||
state.videoPath ? 'video-visible' : 'video-not-visible'
|
||||
} chat--${
|
||||
state.activeContent[state.activeChannelId]
|
||||
? 'content-visible'
|
||||
: 'content-not-visible'
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
if (navigator.userAgent.match(/iPhone/i) && !navigator.userAgent.match('CriOS')) {
|
||||
document.getElementById("chat").classList.add("live-chat--iossafari")
|
||||
}
|
||||
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
|
||||
let vh = window.innerHeight * 0.01;
|
||||
// Then we set the value in the --vh custom property to the root of the document
|
||||
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
||||
document.body.style.setProperty('min-height','-webkit-fill-available')
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue