Commit a99c6709 authored by zhaoyong's avatar zhaoyong

修改Webview 多个页面来回切换的时候,在XTextInputPlugin的194行会报空指针异常

parent 77df599a
...@@ -191,8 +191,13 @@ public class XTextInputPlugin { ...@@ -191,8 +191,13 @@ public class XTextInputPlugin {
if (isInputConnectionLocked) { if (isInputConnectionLocked) {
return lastInputConnection; return lastInputConnection;
} }
lastInputConnection = platformViewsController.getPlatformViewById(inputTarget.id).onCreateInputConnection(outAttrs); View platformView = platformViewsController.getPlatformViewById(inputTarget.id);
return lastInputConnection; if (platformView != null) {
lastInputConnection = platformView.onCreateInputConnection(outAttrs);
return lastInputConnection;
} else {
return null;
}
} }
outAttrs.inputType = inputTypeFromTextInputType( outAttrs.inputType = inputTypeFromTextInputType(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment