ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
610 stars 274 forks source link

Detect keyboard height change on iOS; Calculate Android screen height properly #199

Closed SebastianSchirmer closed 8 years ago

SebastianSchirmer commented 8 years ago

1) Add _keyboardChangeObserver for iOS to detect keyboard size change when switching to or from iOS emoji keyboard as the emoji keyboard's height is different from the "normal" keyboard. This fires a new event: "native:keyboardchange" in addition to the already existing events "native:keyboardshow" and "native:keyboardhide".

2) calculate screen height properly for android versions >= 21: Lollipop 5.x, Marshmallow 6.x. See: http://stackoverflow.com/a/29257533/3642890 beware of nexus 5

Without having it verified, this pull request probably solves #192, #160 (1) and #193 (2), as well as #195.

tlancina commented 8 years ago

Thanks for the PR! Could you create two separate PRs for each feature/fix when you get a chance please?

SebastianSchirmer commented 8 years ago

Alright.

keenan35i commented 8 years ago

does this fix the issue with some android devices that have the in screen buttons, hight calculation issue?

SebastianSchirmer commented 8 years ago

@keenan35i it should, yes. Haven't found time yet to split into 2 separate PR's, will try to until end of this week.

keenan35i commented 8 years ago

Sweet! thanks have been looking for a solution for that for a long time.

SebastianSchirmer commented 8 years ago

@tlancina I've created 2 PRs as separate branches in a forked repo. Now, as I haven't done many PRs yet, could you please advise what the best way would be to come up with 2 separate PRs? Merge branch 1, PR, then roll back, merge branch 2 and another PR?

SebastianSchirmer commented 8 years ago

Ok, split this PR into two: #203 and #204 as requested by @tlancina . Therefore closing this one.