[TIMOB-5354] iOS: Text area animation buggy
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-13T17:56:49.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Release 3.1.0, 2012 Sprint 25, 2012 Sprint 25 Core |
Components | iOS |
Labels | core, module_textarea, qe-testadded |
Reporter | Sandeep Bhimavarapu |
Assignee | Satyam Sekhri |
Created | 2011-09-23T12:03:12.000+0000 |
Updated | 2013-01-03T11:01:23.000+0000 |
Description
The case here is that the text area is being animated, to adjust for the keyboard when TextArea is focused so that the user sees the bottom of the text area when he tries to edit the textarea. This looks good when animating the bottom up but looks weird when the user clicks 'return' on the keyboard and then the bottom of textarea comes down. It looks like the animation starts at a too high value for bottom.
Sample app.js:
{noformat}
var win = Titanium.UI.createWindow({backgroundColor: 'white'});
var ta1 = Ti.UI.createTextArea({
value: 'Next level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably havent heard of them mixtape. High life letterpress shoreditch fap, mcsweeneys lomo master cleanse marfa vice wayfarers keffiyeh before they sold out dreamcatcher blog. Freegan you probably havent heard of them wolf, skateboard thundercats gentrify letterpress food truck portland mcsweeneys jean shorts photo booth shoreditch tumblr. Readymade food truck fixie, quinoa photo booth iphone blog etsy artisan level lo-fi messenger bag, cosby sweater blog readymade iphone cardigan farm-to-table stumptown vice mlkshk. Leggings marfa vegan, wayfarers williamsburg mixtape before they sold out whatever Austin gentrify pitchfork iphone trust fund. Cosby sweater Austin messenger bag, squid american apparel fixie brunch beard blog scenester keytar. Gentrify vinyl you probably haven',
backgroundColor: '#fce',
top: 0,
left: 0,
right: 0,
bottom: 0,
color: 'green',
font: {fontSize : 15},
autoLink: Ti.UI.AUTODETECT_ALL
});
ta1.addEventListener('focus', function(){
var anim = Ti.UI.createAnimation({
duration: 1500,
bottom: 220
});
// Set the value to itself to force set position to end
ta1.value = ta1.value;
ta1.animate(anim);
});
ta1.addEventListener('blur', function(){
var anim = Ti.UI.createAnimation({
duration: 1500,
bottom: 0
});
ta1.animate(anim);
});
win.add(ta1);
win.open()
{noformat}
It can be noticed that 11 lines of text is seen on focus but when the 'return' is hit, animation starts as if the textarea is higher than intended (5-6 lines are seen at the start of the animation)
Tested on the iOS simulator with 2.1GA, issue still exists.
Used to work in 3.0.0 master builds and then regressed by https://github.com/appcelerator/titanium_mobile/pull/2763 Fix is to have UIViewAnimationOptionBeginFromCurrentState in animation options.
PR https://github.com/appcelerator/titanium_mobile/pull/3568
On click of Return on keyboard, the text area animates down smoothly and also there is no gap between the last line of text and text area bottom border Verified on: Titanium Studio: 3.0.1.201212181159 Titanium SDK: 3.1.0.v20130102102603 iOS Device: iPhone 3GS (v5.1), iPad2 (v5.1) XCode: 4.5.2