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-5824: Android: WebView.evalJS Causes Form Input Fields to Lost/Not Retain Focus #2540
Conversation
String code = "javascript:_TiReturn.setValue((function(){try{return " + expression | ||
+ "+\"\";}catch(ti_eval_err){return '';}})());"; | ||
Log.d(LCAT, "getJSValue:" + code); | ||
synchronized (this) { |
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.
Synchronizing on codeSnippets is safer.
Code updated, ready for review again. |
CR/FR in progress |
Log.e(LCAT, "Interrupted", e); | ||
// Don't try to evaluate js code again if the binding has already been destroyed | ||
if (!destroyed) { | ||
String code = "javascript:_TiReturn.setValue((function(){try{return " + expression |
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.
Given that now you do direct eval(code), seems like you don't need 'javascript:' prefix ?
Code reviewed. Will accept CR and perform FR once comments Max made regarding the javascript prefix have been addressed. |
} | ||
|
||
if (destroyed) { | ||
return null; |
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.
early return
Code updated. |
Code looks good. APPROVED |
Code reviewed and functional test passed. KS tested and looks ok on both V8 and Rhino. Accepted |
TIMOB-5824: Android: WebView.evalJS Causes Form Input Fields to Lost/Not Retain Focus
https://jira.appcelerator.org/browse/TIMOB-5824
To test, please use test case in Jira.
Please run in KS: Base UI > Views > Web Views > Local URL.
Also, run ui test suite in drillbit.