Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android keyboard not pushing view up on input focus #307

Closed
sasikanth513 opened this issue Sep 7, 2015 · 5 comments
Closed

android keyboard not pushing view up on input focus #307

sasikanth513 opened this issue Sep 7, 2015 · 5 comments

Comments

@sasikanth513
Copy link

I'm using latest version of the pcakage and I saw #89 issue and I commented out

Cordova.depends({
   'com.ionic.keyboard': '1.0.4'
 });

in package.js file and it is working fine in iOS but not scrolling to input when input is focused in android but pushing view to keyboard height.

I'm not wrapping my code in ionView and ionContent also.

Is this issue related to here if I'm not following above things.

Any solution for this?

@rohanray
Copy link

rohanray commented Sep 7, 2015

+1

@sasikanth513 sasikanth513 changed the title android keyboard not pushing view up android keyboard not pushing view up when focused on input Sep 7, 2015
@sasikanth513 sasikanth513 changed the title android keyboard not pushing view up when focused on input android keyboard not pushing view up Sep 7, 2015
@sasikanth513 sasikanth513 changed the title android keyboard not pushing view up android keyboard not pushing view up on input focus Sep 7, 2015
@rahul-sdei
Copy link

did you find any solution for this?

@Roshdy
Copy link

Roshdy commented Dec 23, 2017

+1

@da314pc
Copy link

da314pc commented Aug 14, 2018

if your still using it:
these methods were removed from cordova android:
"native.keyboardshow" & "native.keyboardhide",

so these lines of code won't get triggered:

window.addEventListener('native.keyboardshow', function (event) {
// TODO: Android is having problems
if (Platform.isAndroid()) {
return;
}
$('body').addClass('keyboard-open');
var keyboardHeight = event.keyboardHeight;
// Attach any elements that want to be attached
$('[data-keyboard-attach]').each(function (index, el) {
$(el).data('ionkeyboard.bottom', $(el).css('bottom'));
$(el).css({bottom: keyboardHeight});
});
// Move the bottom of the content area(s) above the top of the keyboard
$('.content.overflow-scroll').each(function (index, el) {
$(el).data('ionkeyboard.bottom', $(el).css('bottom'));
$(el).css({bottom: keyboardHeight});
});
// Scroll to the focused element
scrollToFocusedElement(null, keyboardHeight);
});
window.addEventListener('native.keyboardhide', function (event) {
// TODO: Android is having problems
if (Platform.isAndroid()) {
return;
}
// $('input, textarea').blur();
$('body').removeClass('keyboard-open');
// Detach any elements that were attached
$('[data-keyboard-attach]').each(function (index, el) {
$(el).css({bottom: $(el).data('ionkeyboard.bottom')});
});
// Reset the content area(s)
$('.content.overflow-scroll').each(function (index, el) {
$(el).css({bottom: $(el).data('ionkeyboard.bottom')});
});
});

Try removing this from your config.xml


Also update your ionic keyboard to: ionic-plugin-keyboard@2.2.1

@da314pc
Copy link

da314pc commented Aug 14, 2018

remove the cordova plugin keyboard from your config.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants