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

[TIMOB-25580] Android: Prevent EVENT_RETURN firing twice #9652

Merged
merged 8 commits into from Dec 14, 2017

Conversation

garymathews
Copy link
Contributor

  • Prevent onEditorAction firing EVENT_RETURN
TEST CASE
var win = Ti.UI.createWindow(),
    text = Ti.UI.createTextArea({
        value: 'TEXT',
        top: 10,
        left: 10,
        right: 10,
        height: 200
    });

text.addEventListener('return', function() {
    alert('return event fired');
});

win.add(text);
win.open();

JIRA Ticket

@build
Copy link
Contributor

build commented Dec 4, 2017

Fails
🚫

Tests have failed, see below for more information.

Messages
📖

👍 Hey!, You deleted more code than you added. That's awesome!

📖

💾 Here's the generated SDK zipfile.

Tests:

Classname Name Time Error
android.Titanium.UI.WebView userAgent 5.784 Error: invalid userAgent

Generated by 🚫 dangerJS

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Dec 4, 2017

FR Passed.

return event is fired only once.

Studio Ver: 5.0.0.201711301752
SDK Ver: 7.1.0.v20171204104830
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.11-4
Appc CLI: 7.0.0-master.55
Ti CLI Ver: 5.0.14
Alloy Ver: 1.10.9
Node Ver: 8.9.1
Java Ver: 1.8.0_101
Devices: ⇨ google Pixel --- Android 7.1.1

Copy link
Contributor

@jquick-axway jquick-axway 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, we need to test TextField return key handling too since this code change affects it as well. Particularly when the RETURN key has been replaced by NEXT or DONE, which must fire a return event as well.

@lokeshchdhry
Copy link
Contributor

@jquick-axway , Thanks for the suggestion.
@garymathews , I see that when I have 3 textfields each with return event listener, the return event is not fired for next & done.

@garymathews
Copy link
Contributor Author

@lokeshchdhry Updated PR

@build build added the android label Dec 5, 2017
@lokeshchdhry
Copy link
Contributor

FR reviewed & passed.

return event is fired after next & `done for textfields.

Studio Ver: 5.0.0.201711301752
SDK Ver: 7.0.0 local build
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.11-4
Appc CLI: 7.0.0-master.56
Ti CLI Ver: 5.0.14
Alloy Ver: 1.10.9
Node Ver: 8.9.1
Java Ver: 1.8.0_101
Devices: ⇨ google Nexus 5 --- Android 6.0.1
⇨ google Pixel --- Android 7.1.1

@lokeshchdhry
Copy link
Contributor

@garymathews , can you please look at this. It says needs tests.

@garymathews
Copy link
Contributor Author

Adding no tests as user input is required to test

@build build added the android label Dec 13, 2017
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

5 participants