| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityhey @EddyVerbruggen -- I might be missing something but I don't think the proposed addition changes the logic of the conditional statement. If actionId was IME_ACTION_UNSPECIFIED the conditional would have been truthy because of the 2nd row in the statement so if we progressed till the end we already know it is not IME_ACTION_UNSPECIFIED and we do not need to check for it explicitly:
if (actionId === android.view.inputmethod.EditorInfo.IME_NULL || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_UNSPECIFIED || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_DONE || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_GO || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEARCH || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEND || (actionId !== android.view.inputmethod.EditorInfo.IME_ACTION_UNSPECIFIED && event && event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER)) { // If it is TextField, close the keyboard. If it is TextView, do not close it since the TextView is multiline // https://github.com/NativeScript/NativeScript/issues/3111 if (textView.getMaxLines() === 1) { owner.dismissSoftInput(); } owner._onReturnPress(); }Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@manoldonev That's a very valid point. I tested this change with the 3.4 version of code modules where the actionId === android.view.inputmethod.EditorInfo.IME_NULL || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_UNSPECIFIED || lines weren't present (both those static properties resolve to 0 btw) so that worked as expected. In the 4.0 branch this change doesn't make sense anymore as you pointed out.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@manoldonev I wonder why we need those first 2 lines anyway, because there doesn't seem to be a returnPress event being fired on a TextView anyway.
I mean, this is the implementation on TextField, and there's no implemenation on TextView, and the superclass implementation is empty.
So I think we could remove those 2 lines from the if statement and this will work. Thoughts?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@EddyVerbruggen @hshristov added those lines to fix #5121 (new lines with Japanese IME).
I wonder now whether we can remove the IME_ACTION_GO, IME_ACTION_SEARCH, and IME_ACTION_SEND explicit checks as it seems each of them gets a complementary IME_ACTION_UNSPECIFIED that we will handle -- have to check this.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNew PR proposal for this issue here: #5727
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.