Project: titanium
Issue TIMOB-15967: iOS: keyboardToolbar fails to disappear
h4. Expectation Expect keyboardToolbar to disappear AND NEVER RETURN when the parent containing its window is closed. h4. Reality keyboardToolbar slides off the screen to the right instead of down, and will slide in right to left under new keyboard h4. Demonstration App in the Wild: http://screencast.com/t/U78lP3Lhpv Test Case Video: http://screencast.com/t/ig9D9PpePY2a h4. Testcase This test case shows the weird animation (tool bar left to right, instead of sliding up with keyboard), but the bar does not stick as it does in the video. The test case matches the view layers of the affected app. {code} var tabGroup = Ti.UI.createTabGroup(); var textWindow = Titanium.UI.createWindow({ backgroundColor:'#fff' }); var textfield = Ti.UI.createTextField({keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD, returnKeyType: Ti.UI.RETURNKEY_DONE, bubbleParent: false, backgroundColor: '#262626', border: 1, width: 100}); var toolbarDone = Ti.UI.createButton({systemButton: Titanium.UI.iPhone.SystemButton.DONE}); var flexSpace = Titanium.UI.createButton({systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE}); toolbarDone.addEventListener('click', function(){ textfield.blur(); }); textfield.keyboardToolbarColor = '#80c342'; textfield.keyboardToolbar = [flexSpace, toolbarDone]; var scrlView = Ti.UI.createScrollView({layout:'vertical', scrollType: 'vertical', width: Ti.UI.FILL}); scrlView.add(textfield); textWindow.add(scrlView); textWindow.addEventListener('focus', function(){ textfield.value = ''; }) var secondaryWindow = Ti.UI.createWindow({backgroundColor: 'red'}); var mainWindow = Ti.UI.createWindow({backgroundColor: '#fff'}); var bigButton = Ti.UI.createButton({height: 150, width: 150, title: 'Button', backgroundColor: 'red'}); mainWindow.add(bigButton); var tab1 = Ti.UI.createTab({window: mainWindow, title: 'Main'}); var tab2 = Ti.UI.createTab({window: secondaryWindow, title: 'Second'}); bigButton.addEventListener('click', function(){ tab1.open(textWindow); }); tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.open(); {code}
Story points: 8