Page 1 of 1

Fixed header and footer not positioning correctly after canceling a text input

Posted: Mon May 05, 2014 9:12 pm
by Tiago Ramos

On iOS, if I focus on a text input and close it by pressing "done", the header and footer go to their correct places, but if I close the text box by tapping somewhere else in the screen, this happens:

Image


Fixed header and footer not positioning correctly after canceling a text input

Posted: Tue May 06, 2014 9:53 am
by Evgene Karachevtsev

Hi Tiago,

We reproduced the issue, working on it.


Fixed header and footer not positioning correctly after canceling a text input

Posted: Tue May 06, 2014 1:18 pm
by Evgene Karachevtsev

Hello Tiago,

Please look at this link: https://getsatisfaction.com/apperyio/...


Fixed header and footer not positioning correctly after canceling a text input

Posted: Tue May 06, 2014 1:23 pm
by Tiago Ramos

Unfortunately, that link doesn't really offer an answer to my problem.
Isn't there a way to force the header and footer to re render once the keyboard goes away?

I've tried hiding the footer when focusing a text box and showing it again on a blur event, but the result is that the footer flickers around a bit before ending up in the right position and the header is still messy (I can't really afford to hide the header).


Fixed header and footer not positioning correctly after canceling a text input

Posted: Wed May 07, 2014 1:24 pm
by Tiago Ramos

Though it's not an elegant fix, this bit of code manages to work around the problem by forcing a an update:

code$(document).on('blur', 'input, textarea', function() {
setTimeout(function() {
window.scrollTo(document.body.scrollLeft, document.body.scrollTop);
}, 0);
});
/code


Fixed header and footer not positioning correctly after canceling a text input

Posted: Wed May 07, 2014 1:35 pm
by Evgene Karachevtsev

Hello,

Thank you for the update. Let us know if you need any further help.