-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Thank you very much, you already helped me very much. Maybe we can put your approach into an npm-package?
I created an event listener, to set position property:
if (window.matchMedia) {
const mediaQueryList = window.matchMedia('print');
mediaQueryList.addEventListener('change', (mql) => {
if (mql.matches) {
document.querySelectorAll('ion-content').forEach((element) => {
const scroll = element.shadowRoot.querySelector('.inner-scroll') as HTMLElement;
scroll.style.position = 'relative';
});
} else {
document.querySelectorAll('ion-content').forEach((element) => {
const scroll = element.shadowRoot.querySelector('.inner-scroll') as HTMLElement;
scroll.style.removeProperty('position');
});
}
});
}Also I extended the styles because I had some problems with (ion-tabs, ion-split-pane):
body {
position: relative !important;
max-width: unset !important;
height: unset !important;
max-height: unset !important;
overflow: visible; /* enable scroll on body */
}
ion-app,
ion-router-outlet,
ion-content,
ion-split-pane,
ion-tabs,
.ion-page:not(.ion-page-hidden),
.tabs-inner {
position: relative !important;
contain: unset !important;
display: block !important;
overflow: unset !important; /* remove default overflow hidden */
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels