Expectation
Expect keyboardToolbar to appear every time keyboard is shown.
Demonstration Video
http://screencast.com/t/6ReuzfPS
Reality
keyboardToolbar does not appear every time keyboard is shown. In the demo video, it occurred on the second iteration. This is not a constant, as it may not do it for 3 or 4 openings.
Testcase
var mainWindow = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var textfield = Ti.UI.createTextField({keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD, returnKeyType: Ti.UI.RETURNKEY_DONE, 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];
mainWindow.add(textfield);
mainWindow.open();
Confirmed on this system: Titanium Command-Line Interface, CLI version 3.1.2, Titanium SDK version 3.1.3.GA Operating System Name = Mac OS X Version = 10.9 Memory = 8.0GB node.js node.js Version = v0.10.15 npm Version = 1.3.5 Xcode 4.6.3 (build 4H1503) Install Location = /Users/danielplunkett/Desktop/Xcode46.app/Contents/Developer iOS SDKs = 6.1 iOS Simulators = 6.0, 6.1 5.0.1 (build 5A2053) Install Location = /Applications/Xcode.app/Contents/Developer iOS SDKs = 7.0 iOS Simulators = 7.0
Hi Stephen, Thanks for reporting this issue with greater details. It is much helpful. I have moved this bug for further investigation by Engineering. All updates to this bug will be posted here. We hope to get it fixed soon. If you have any question, please let us know. Regards, Shak
This issue is reproducible. On the iphone 5s (7.0.2), you will need to press the text field twice to reproduce the issue. On the iphone 4s (6.0.1), you will need to press the text field at least 10 - 20 times. Tested on: Titanium Studio, build: 3.2.0.20131209161348 SDK build: 3.2.0.v20131209192649 CLI: 3.2.0-cr Alloy: 1.3.0-cr Xcode: 5.0.2 Device: iphone 5 (7.0.2), iphone 4s (6.0.1)
This prevents the shipping of an app.
https://github.com/appcelerator/titanium_mobile/pull/5165
32X PR : https://github.com/appcelerator/titanium_mobile/pull/5174
Closing ticket as fixed. Verified the keyboard's toolbar does not disappear after making the keyboard appear multiple times (10 - 20 times). Tested on: Titanium Studio, build: 3.2.1.201401052124 SDK build: 3.2.1.v20140106134045, 3.3.0.v20140106141645 CLI: 3.2.0 Alloy: 1.3.1-beta Xcode: 5.0.2 Devices: iphone 4s (6.0.1), iphone 5s (7.0.2), iphone simulator retina 4-inch (7.0.3)