Skip to content

Commit

Permalink
fix(content): resolve height inheritance issues (#20309)
Browse files Browse the repository at this point in the history
fixes #20305
  • Loading branch information
liamdebeasi committed Jan 27, 2020
1 parent 0034088 commit 09bef71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
11 changes: 7 additions & 4 deletions core/src/components/content/content.scss
Expand Up @@ -59,8 +59,12 @@
--background: #{$background-color-step-50};
}

#scroll-content {
min-height: 100%;
#background-content {
@include position(calc(var(--offset-top) * -1), 0px,calc(var(--offset-bottom) * -1), 0px);

position: absolute;

background: var(--background);
}

.inner-scroll {
Expand All @@ -69,7 +73,6 @@

position: absolute;

background: var(--background);
color: var(--color);

box-sizing: border-box;
Expand Down Expand Up @@ -124,7 +127,7 @@
}

.transition-effect {

display: none;
position: absolute;

Expand Down
5 changes: 2 additions & 3 deletions core/src/components/content/content.tsx
Expand Up @@ -320,6 +320,7 @@ export class Content implements ComponentInterface {
'--offset-bottom': `${this.cBottom}px`,
}}
>
<div id="background-content"></div>
<main
class={{
'inner-scroll': true,
Expand All @@ -330,9 +331,7 @@ export class Content implements ComponentInterface {
ref={el => this.scrollEl = el!}
onScroll={ev => this.onScroll(ev)}
>
<div id="scroll-content">
<slot></slot>
</div>
<slot></slot>
</main>

{transitionShadow ? (
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/refresher/refresher.tsx
Expand Up @@ -161,7 +161,7 @@ export class Refresher implements ComponentInterface {
}

private async setupiOSNativeRefresher(pullingSpinner: HTMLIonSpinnerElement, refreshingSpinner: HTMLIonSpinnerElement) {
this.elementToTransform = this.scrollEl!.querySelector(`#scroll-content`) as HTMLElement | undefined;
this.elementToTransform = this.scrollEl!;
const ticks = pullingSpinner.shadowRoot!.querySelectorAll('svg');
const MAX_PULL = this.scrollEl!.clientHeight * 0.16;
const NUM_TICKS = ticks.length;
Expand Down

0 comments on commit 09bef71

Please sign in to comment.