Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8_3_X] fix(android): default Ti.Ui.TextField.editable is true in #focus() #11406

Merged
merged 1 commit into from Dec 20, 2019

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented Dec 20, 2019

JIRA: https://jira.appcelerator.org/browse/TIMOB-27694

Optional Description:
If the proxy doesn't have an explicit value set for editable, assume true by default

Test Case:

var win = Ti.UI.createWindow({
  title : "Focus Test",
  backgroundColor : 'red',
  layout : "vertical"
});
 
// Create a TextField.
var aTextField = Ti.UI.createTextField({
  height : 40,
  top : 30,
  left : 20,
  right : 20,
  backgroundColor : "gray",
  hintText : 'This is hint text',
  softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
  keyboardType : Ti.UI.KEYBOARD_DEFAULT,
  returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
  borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});
 
// Listen for return events.
aTextField.addEventListener('return', function(e) {
  aTextField.blur();
  alert('Input was: ' + aTextField.value);
});
 
// Add to the parent view.
win.add(aTextField);
 
// Create a Button.
var test = Ti.UI.createButton({
  title : 'Focus Test',
  height : Ti.UI.SIZE,
  width : Ti.UI.SIZE,
  top : 50,
});
 
// Listen for click events.
test.addEventListener('click', function() {
  aTextField.focus();
  //alert('\'aButton\' was clicked!');
});
 
// Add to the parent view.
win.add(test);
 
win.open();

If the proxy doesn't have an explicit value set for editable, assume true by default

Fixes TIMOB-27694
@build
Copy link
Contributor

build commented Dec 20, 2019

Fails
🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 10 tests have failed There are 10 tests failing and 710 skipped out of 7321 total tests.

Tests:

ClassnameNameTimeError
android.emulator.fs#readFile() returns String when utf-8 encoding set via options object argument2.045
Error: timeout of 2000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.fs#readFile() returns String when utf-8 encoding set via second argument2.189
Error: timeout of 2000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.fs#readFile() returns Buffer when no encoding set2.002
Error: timeout of 2000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.LayoutwidthPrecedence16.841
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.WebViewuserAgent40.859
Error: timeout of 30000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
ios.ipad.Titanium.Network.Socket.TCP#connect(), #write(), #pump() async0.051
Error: failed to receive success
file:///Users/build/Library/Developer/CoreSimulator/Devices/F77CB658-56A6-4456-8790-32B676E15B36/data/Containers/Bundle/Application/5C2674E0-FE19-4BAE-9C0E-121768996566/mocha.app/ti.network.socket.tcp.test.js:168:17
ios.ipad.Titanium.Network.Socket.TCP#connect() and receive data0.109
Error: failed to receive success
file:///Users/build/Library/Developer/CoreSimulator/Devices/F77CB658-56A6-4456-8790-32B676E15B36/data/Containers/Bundle/Application/5C2674E0-FE19-4BAE-9C0E-121768996566/mocha.app/ti.network.socket.tcp.test.js:96:17
ios.iphone.Titanium.Geolocation#reverseGeocoder()0.915
Error: expected 'United States of America' to equal 'USA'
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/F106B90B-6592-4206-B9F1-EED8DEA7340B/data/Containers/Bundle/Application/EE86065F-EC7F-403B-B197-052E149D7213/mocha.app/node_modules/should/cjs/should.js:275:19
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/F106B90B-6592-4206-B9F1-EED8DEA7340B/data/Containers/Bundle/Application/EE86065F-EC7F-403B-B197-052E149D7213/mocha.app/node_modules/should/cjs/should.js:356:13
file:///Users/build/Library/Developer/CoreSimulator/Devices/F106B90B-6592-4206-B9F1-EED8DEA7340B/data/Containers/Bundle/Application/EE86065F-EC7F-403B-B197-052E149D7213/mocha.app/ti.geolocation.test.js:287:38
ios.iphone.Titanium.Network.Socket.TCP#connect(), #write(), #pump() async0.025
Error: failed to receive success
file:///Users/build/Library/Developer/CoreSimulator/Devices/F106B90B-6592-4206-B9F1-EED8DEA7340B/data/Containers/Bundle/Application/EE86065F-EC7F-403B-B197-052E149D7213/mocha.app/ti.network.socket.tcp.test.js:168:17
ios.iphone.Titanium.Network.Socket.TCP#connect() and receive data0.063
Error: failed to receive success
file:///Users/build/Library/Developer/CoreSimulator/Devices/F106B90B-6592-4206-B9F1-EED8DEA7340B/data/Containers/Bundle/Application/EE86065F-EC7F-403B-B197-052E149D7213/mocha.app/ti.network.socket.tcp.test.js:96:17

Generated by 🚫 dangerJS against 03f746b

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS

@lokeshchdhry
Copy link
Contributor

FR Passed.

Keyboard pops up when focus() is used.

Studio Ver: 6.0.0.201911251516
SDK Ver: 8.3.1 local build
OS Ver: 10.14.5
Xcode Ver: Xcode 11.2.1
Appc NPM: 5.0.0-2
Appc CLI: 7.1.2
Daemon Ver: 1.1.3
Ti CLI Ver: 5.2.2
Alloy Ver: 1.14.4
Node Ver: 12.13.1
NPM Ver: 6.12.1
Java Ver: 11.0.1
Android Devices: ⇨ google Pixel (Android 10)
Emulator: Android 8.1

@sgtcoolguy sgtcoolguy merged commit 243afd0 into tidev:8_3_X Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants