( componentEl: HTMLElement, contentEl: HTMLElement, keyboardHeight: number, platformHeight: number )
| 10 | } |
| 11 | |
| 12 | export const getScrollData = ( |
| 13 | componentEl: HTMLElement, |
| 14 | contentEl: HTMLElement, |
| 15 | keyboardHeight: number, |
| 16 | platformHeight: number |
| 17 | ): ScrollData => { |
| 18 | const itemEl = (componentEl.closest('ion-item,[ion-item]') as HTMLElement) ?? componentEl; |
| 19 | return calcScrollData( |
| 20 | itemEl.getBoundingClientRect(), |
| 21 | contentEl.getBoundingClientRect(), |
| 22 | keyboardHeight, |
| 23 | platformHeight |
| 24 | ); |
| 25 | }; |
| 26 | |
| 27 | const calcScrollData = ( |
| 28 | inputRect: ClientRect, |
no test coverage detected