FIX: Bug when scrolling in iOS Safari with composer open (#12831)

Regression was introduced in c54609.

This ensures the full height composer styling only applies when (window
height - viewport height > 0). Previously it was being wrongly triggered
when that calculation returned a negative number.
This commit is contained in:
Penar Musaraj 2021-04-25 22:14:13 -04:00 committed by GitHub
parent 60059a7190
commit 886f4b589e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ export default Component.extend(KeyEnterEscape, {
const viewportWindowDiff = const viewportWindowDiff =
this.windowInnerHeight - window.visualViewport.height; this.windowInnerHeight - window.visualViewport.height;
viewportWindowDiff viewportWindowDiff > 0
? doc.classList.add("keyboard-visible") ? doc.classList.add("keyboard-visible")
: doc.classList.remove("keyboard-visible"); : doc.classList.remove("keyboard-visible");