TableView Displacement Bug.
I encountered this behavior while placing a textfield in the last row of my tableview. Once you focus on the textfield or area the keyboard comes up as expected. I placed a blur() on a button in the keyboard toolbar. So when you click/tap it hides the keyboard. The Tableview slides up so it is always visible when typing.
The problem occurs on blur that the keyboard slides down, it seems the extra spaced padded into the tableview that pushed the row up persist.
I checked this in kitchenSink on the Iphone and it has the same behavior. Just go o the tableView demo with text fields and enter text in the last row and hit the retunr key.
The space is added at the bottom and I haven't found a way to remove it.
Anyone have an idea or workaround?
6 Answers
-
I've run into this same problem. Did you ever find a solution?
-
This is a problem for me too! When the keyboard shows, the tableview is being scrolled upwards for like 5 pixels. When the keyboard is blurred, the tableview is stuck in that position. I've tried with scrollable:false and moving:false but nothing works! =(
-
hm same problem here. Everything worked fine under iOS 4.3 but with iOS 5 thats a big problem.
-
I found the solution. try to put everything in a view and put layout= scroll
like this:var view = Ti.UI.createView({ top:pHeight/pHeight, contentHeight:'auto', contentWidth:'auto', bottom:pHeight/10, layout:'scroll' });
and then add your tableview in "view".
-
I had a similar issue on a webview. I'd have a text box inside of a div that was fixed on the page. When i clicked inside the text box, hide the keyboard, and then tried to click in the input again, it would be offset a bit. I resolved this by setting a height to my body of my webview. This might not relate to the tableview but i figured it might help someone.
So for example. i have a landscape app so i set my height of the html body to 750px and it resolved it. Since the container is not bigger than the screen, it will retain back to the normal position.
You should be able to then allow overflow scroll of the div.
-
Anybody managed to solve it?