mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-05 04:15:58 +00:00
Fix white borders in PiP mode android (Fix scroll issues in small documents) (#3362)
* Fix scroll issues in small documents (PiP mode android) This scroll issue resulted in white borders on android PiP mode.
This commit is contained in:
@@ -71,6 +71,13 @@ body {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* This prohibits the view to scroll for pages smaller than 122px in width
|
||||
we use this for mobile pip webviews */
|
||||
.no-scroll-body {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* We use this to not render the page at all until we know the theme.*/
|
||||
.no-theme {
|
||||
opacity: 0;
|
||||
|
||||
@@ -132,6 +132,16 @@ export const GroupCallView: FC<Props> = ({
|
||||
};
|
||||
}, []);
|
||||
|
||||
// This CSS is the only way we could find to not make element call scroll for
|
||||
// viewport sizes smaller than 122px width. (It is actually this exact number: 122px
|
||||
// tested on different devices...)
|
||||
useEffect(() => {
|
||||
document.body.classList.add("no-scroll-body");
|
||||
return (): void => {
|
||||
document.body.classList.remove("no-scroll-body");
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
window.rtcSession = rtcSession;
|
||||
return (): void => {
|
||||
|
||||
Reference in New Issue
Block a user