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
[7_1_X][TIMOB-25671]Android : TextField's some returnKeyType values not firing 'return' event #9943
Conversation
Add return event property for distinguishing the origin of the event.
Generated by 🚫 dangerJS |
//Refer to TiUIText.handleReturnKeyType(int) for a list of return keys that are mapped to EditorInfo.IME_ACTION_NEXT and EditorInfo.IME_ACTION_DONE. | ||
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_DONE) { | ||
data.put(TiC.PROPERTY_BUTTON, RETURN_KEY_TYPE_ACTION); | ||
// Check whether we a dealing with text area or text field. Multiline TextViews in Landscape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"we are dealing"
apidoc/Titanium/UI/TextField.yml
Outdated
description: | | ||
Since in Landscape mode Android provides both the New Line and the Action type | ||
buttons as return keys the 'button' property in the event is used to distinguish from | ||
which key has the event been fired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Android provides both the new line- and the action buttons as return keys in landscape mode, the
button
property in the event is used to distinguish from which key the event has been fired.
In general: I think @jquick-axway can give some language advices here as well.
apidoc/Titanium/UI/TextField.yml
Outdated
properties: | ||
- name: value | ||
summary: Value of this text area. | ||
type: String | ||
- name: button | ||
summary: Constant indication whether the event is from New line or Action key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constant indicating whether the event is from a new line- or action key.
apidoc/Titanium/UI/UI.yml
Outdated
@@ -2720,6 +2720,20 @@ properties: | |||
since: "3.0.0" | |||
permission: read-only | |||
|
|||
- name: RETURN_KEY_TYPE_ACTION | |||
summary: The returnKeyEvent has been send by the Action button on the software keyboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
return
event has been sent by the action button on the software keyboard.
apidoc/Titanium/UI/UI.yml
Outdated
permission: read-only | ||
|
||
- name: RETURN_KEY_TYPE_CARTRIDGE_RETURN | ||
summary: The returnKeyEvent has been send by the New Line\Cartridge Return button on the software keyboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
return
evtn has been sent by the new line- or cartridge return button on the software keyboard.
@hansemannn Updated the wording and mistakes. BTW why the '-' after 'new line'? |
FR Passed.
Studio Ver: 5.1.0 |
Waiting for CR to pass. |
JIRA: https://jira.appcelerator.org/browse/TIMOB-25671
Description:
Backport of: #9933
With updated docs.