fix(popover): ion-scroll sizing

fixes #14911
This commit is contained in:
Manu Mtz.-Almeida
2018-08-07 23:18:11 +02:00
parent 8cc1ce253e
commit b85d4a0549
4 changed files with 11 additions and 4 deletions

View File

@ -35,8 +35,6 @@
contain: layout size style; contain: layout size style;
} }
:host(.scroll-disabled), :host(.scroll-disabled),
ion-scroll { ion-scroll {
@include padding( @include padding(
@ -51,3 +49,9 @@ ion-scroll {
:host(.outer-content) { :host(.outer-content) {
--ion-color-base: #{$background-color-step-50}; --ion-color-base: #{$background-color-step-50};
} }
:host(.content-size) ion-scroll {
position: relative;
contain: none;
}

View File

@ -1,7 +1,7 @@
import { Component, Element, Listen, Method, Prop, QueueApi } from '@stencil/core'; import { Component, Element, Listen, Method, Prop, QueueApi } from '@stencil/core';
import { Color, Config, Mode } from '../../interface'; import { Color, Config, Mode } from '../../interface';
import { createColorClasses } from '../../utils/theme'; import { createColorClasses, hostContext } from '../../utils/theme';
@Component({ @Component({
tag: 'ion-content', tag: 'ion-content',
@ -93,6 +93,7 @@ export class Content {
return { return {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'content-size': hostContext('ion-popover', this.el),
'scroll-disabled': !this.scrollEnabled, 'scroll-disabled': !this.scrollEnabled,
} }
}; };

View File

@ -12,6 +12,8 @@
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
will-change: scroll-position; will-change: scroll-position;
box-sizing: border-box;
} }
:host(.overscroll)::before, :host(.overscroll)::before,

View File

@ -47,7 +47,7 @@ export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement
const enteringContent = new AnimationC(); const enteringContent = new AnimationC();
if (!contentEl && !enteringToolBarEle && headerEls.length === 0) { if (!contentEl && !enteringToolBarEle && headerEls.length === 0) {
enteringContent.addElement(enteringEl.querySelector(':scope > ion-page, :scope > ion-nav, :scope > ion-tabs')); enteringContent.addElement(enteringEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs'));
} else { } else {
enteringContent.addElement(contentEl); enteringContent.addElement(contentEl);
enteringContent.addElement(headerEls); enteringContent.addElement(headerEls);