fix(content): prevent ion-searchbar from receiving padding adjustment (#18008)

* Fixes #18007 - check for fixed containing element and don't adjust ion-content padding.

* fix lint issue

* searchbar does not receive padding fix

* remove fixed slot check
This commit is contained in:
Cody Sand
2019-05-29 14:35:07 -05:00
committed by Liam DeBeasi
parent fbb76e63ad
commit b2290a6420

View File

@ -24,6 +24,14 @@ function setScrollPadding(input: HTMLElement, keyboardHeight: number) {
if (input.parentElement && input.parentElement.tagName === 'ION-INPUT') {
return;
}
if (
input.parentElement &&
input.parentElement.parentElement &&
input.parentElement.parentElement.tagName === 'ION-SEARCHBAR'
) {
return;
}
const el = input.closest('ion-content');
if (el === null) {
return;