fix(keyboard): remove content padding after input blur

Closes #5800
This commit is contained in:
Adam Bradley
2016-04-11 22:57:26 -05:00
parent 3cf4e522c9
commit e21c4d5927
3 changed files with 33 additions and 8 deletions

View File

@ -70,7 +70,7 @@ export class Keyboard {
* @param {function} callback method you want to call when the keyboard has been closed
* @return {function} returns a callback that gets fired when the keyboard is closed
*/
onClose(callback, pollingInternval = KEYBOARD_CLOSE_POLLING) {
onClose(callback, pollingInternval = KEYBOARD_CLOSE_POLLING, pollingChecksMax = KEYBOARD_POLLING_CHECKS_MAX) {
console.debug('keyboard onClose');
const self = this;
let checks = 0;
@ -84,7 +84,7 @@ export class Keyboard {
function checkKeyboard() {
console.debug('keyboard isOpen', self.isOpen(), checks);
if (!self.isOpen() || checks > 100) {
if (!self.isOpen() || checks > pollingChecksMax) {
rafFrames(30, () => {
self._zone.run(() => {
console.debug('keyboard closed');
@ -183,3 +183,4 @@ export class Keyboard {
}
const KEYBOARD_CLOSE_POLLING = 150;
const KEYBOARD_POLLING_CHECKS_MAX = 100;