* Adjust the desired top position to compensate for shift of the screen * caused by opened keyboard on iOS which affects all elements with position:fixed. * @private * @param top The target top in px. * @returns The adjusted top in px.
(top: number)
| 549 | * @returns The adjusted top in px. |
| 550 | */ |
| 551 | _adjustForIOSKeyboard(top: number): number { |
| 552 | if (!isIOS()) { |
| 553 | return top; |
| 554 | } |
| 555 | |
| 556 | const actualTop = Math.ceil(this.getBoundingClientRect().top); |
| 557 | |
| 558 | return top + (Number.parseInt(this.style.top || "0") - actualTop); |
| 559 | } |
| 560 | |
| 561 | /** |
| 562 | * Callback invoked when the opener element's intersection status changes. |