Skip to content
Snippets Groups Projects
Commit e24f6062 authored by uhensler's avatar uhensler
Browse files

OO-4312: Show full document editor in Safari on iOS devices

parent a94f7448
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,17 @@
$r.render("config")
#if($r.available("editor"))
$r.render("editor")
<script>
/* <![CDATA[ */
## https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--doceditorvh', `${vh}px`);
window.addEventListener('resize', () => {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--doceditorvh', `${vh}px`);
});
/* ]]> */
</script>
#else
<div class="o_warning">
$r.translate("error.no.editor")
......
......@@ -61,7 +61,8 @@ body.o_doceditor_body {
.o_collabora, .o_onlyoffice, .o_office365 {
iframe {
width: 100%;
height: calc(100vh - 65px);
height: calc(100vh - 61px);
height: calc(var(--doceditorvh, 1vh) * 100 - 61px);
margin-top: 10px;
border-width: 0px;
}
......@@ -72,6 +73,7 @@ body.o_doceditor_body {
iframe {
width: 100%;
height: calc(100vh - 321px); // editor selection is not taken
height: calc(var(--doceditorvh, 1vh) * 100 - 321px);
margin-top: 10px;
margin-bottom: 10px;
border-width: 1px;
......@@ -83,6 +85,7 @@ body.o_doceditor_body {
iframe {
width: 100%;
height: calc(100vh - 276px); // editor selection is not taken
height: calc(var(--doceditorvh, 1vh) * 100 - 276px);
margin-top: 10px;
margin-bottom: 25px;
border-width: 1px;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment