Skip to content

Instantly share code, notes, and snippets.

@komendantaa
Last active March 13, 2019 22:39
Show Gist options
  • Save komendantaa/ec1d017a7ac0c2775e6bd95dbae8e2ee to your computer and use it in GitHub Desktop.
Save komendantaa/ec1d017a7ac0c2775e6bd95dbae8e2ee to your computer and use it in GitHub Desktop.
dirty hack ionic keyboard
window.addEventListener('native.keyboardshow', function () {
/*
* This code is a hack to fix the cursor issue.
*/
if (document.activeElement.nodeName === 'INPUT') {
setTimeout(function (){
document.activeElement.setAttribute('disabled', 'true');
setTimeout(function () {
document.activeElement.setAttribute('disabled', '');
}, 10);
}, 350);
}
});
window.addEventListener('native.keyboardshow', function () {
/*
* This code is a hack to fix the cursor issue.
*/
if (document.activeElement.nodeName === 'INPUT') {
setTimeout(function (){
document.activeElement.setAttribute('disabled', 'true');
setTimeout(function () {
document.activeElement.setAttribute('disabled', '');
}, 10);
}, 350);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment