[TIMOB-23491] Keyboard Layout Issue in iPad Pro
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2016-08-09T10:36:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | TextField, iOS, iPadPro |
Reporter | Naga harish M |
Assignee | Angel Petkov |
Created | 2016-06-10T05:00:09.000+0000 |
Updated | 2016-08-09T10:36:32.000+0000 |
Description
Hi,
We are facing a problem with TextField with latest Ti SDK(5.2.2 GA) and iPad Pro device. I did not try with other versions
Here is code
<Alloy>
<Window class="container">
<View width="Ti.UI.FILL" height="Ti.UI.FILL">
<View id="okCancelView">
<TextField id="txtField"/>
</View>
</View>
</Window>
</Alloy>
".container": {
backgroundColor:"#FFF"
}
"#okCancelView":{
width:500,
height:40,
top: 68
}
"#txtField":{
width: 500,
height:50,
borderColor:"#CCC",
borderWidth:2
}
We are getting onscreen keyboard, like this with above code in iPad pro
!http://i.stack.imgur.com/TS1Jh.png!
But if I create sample app in Xcode with textField, We are getting like this.
!http://i.stack.imgur.com/Py9ai.png!
How to get default keyboard layout, same as XCode in Titanium.
Attachments
File | Date | Size |
---|---|---|
protest.zip | 2016-07-20T17:29:11.000+0000 | 24620 |
same result using 5.3.0 SDK
Hi [~nagaharish] using 5.4.0 with the below demo-code should fix the issue. The reason the keyboard looks different initially is because a different constant gets set on the SDK compared to Xcode. Which I find interesting as it means the keyboard displayed by default in Xcode is UIKeyboardTypeASCIICapable instead of UIKeyboardTypeDefault. Demo Code:
Thank you @Angel Petkov, But may I know when we can get proper fix for it. Because adding
manual bit hard for me.
Just tested with latest Xcode and it behaves exactly as we do (since we don't set anything internal as well that could override it). See the attached Xcode project. To note: 9.7" acts the same as we do, the 12.9" acts differently. *EDIT*: You very possibly selected the wrong iPad Pro simulator during your comparisons. Just tested the following code using an 12.9" simulator in Titanium ([Screen](https://abload.de/img/simulatorscreenshot20mxko6.png)):
Please confirm, thanks!
May be I am selecting wrong simulator. But I tested in really Device (iPad pro). Same issue is there in it also. Xcode it works fine. But Titanium code only keyboard is different.
[~nagaharish] Hello, we can't push the fix you desire for two reasons. The first being it's easily fixed if using one of the constant since that's what they are for, otherwise we would have to implement a way of changing the constant depending on the device. Secondly, to achieve it would require applying some bad practices it would also mean that the constants would differ depending on the device as oppose to having one default constant. We would be introducing behavior different to the rest of our UI components. In conclusion to avoid the different appearance in the keyboard please set the appropriate constant.
@Angel Thank you, So I need to manual set this.Ok I will take care. Is above solution works fine with 5.3.0 or 5.3.1. In above comment ur saying 5.4.0 version, but for me last update was 5.3.1 GA.
No problem! I was testing using 5.4.0, however it will work with both 5.3.0 or 5.3.1. Code strong!
@Angel I tried like this
I run in real device also still same issue. keyboard layout is not as expected. Tried in Ti SDK 5.3.0 and 5.3.1 With Xcode 7.3 Please help me.
Just tested using the code above with 5.3.1 GA and 5.3.0, on simulator and device. What I'm seeing is the same keyboard layout as the image representing xcode posted above, the resulting [image](http://imgur.com/a/RwOd4). Can you please confirm if that is the same result ?
@Angle: In existing application after added below line. With out doing any change, in iPad pro I am getting the keyboard what we expected. same like this [http://imgur.com/a/RwOd4] Even I did not added "keyboardType:Titanium.UI.KEYBOARD_TYPE_ASCII" also.
But my total UI is changed. If I added above line in iPad pro. Please suggest me how to fix this.
Oh, good catch! Yes, the iPad-pro handling is of course only enabled if you enable storyscreen-support and/or set the
UIRequiresFullScreen
value totrue
in your plist. If you remove that from native xcode-projects, you will have the same behavior as we have by default. Again: We do not intercept that behavior, it's a matter of configuration. Will close this ticket for now, thanks again!