mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user