Merge pull request #671 from MrNinja/master

[mod] Fix all issues relate to long click in Android version 7.0 (#657, #527)
This commit is contained in:
Lorenzo Pichilli 2021-02-09 21:13:20 +01:00 committed by GitHub
commit 1c0f934a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2048,7 +2048,7 @@ final public class InAppWebView extends InputAwareWebView {
@Override
public void onReceiveValue(String value) {
if (floatingContextMenu != null) {
if (value != null && !value.equals("null")) {
if (value != null && !value.equalsIgnoreCase("null")) {
int x = contextMenuPoint.x;
int y = (int) ((Float.parseFloat(value) * scale) + (floatingContextMenu.getHeight() / 3.5));
contextMenuPoint.y = y;
@ -2068,7 +2068,7 @@ final public class InAppWebView extends InputAwareWebView {
evaluateJavascript(getSelectedTextJS, new ValueCallback<String>() {
@Override
public void onReceiveValue(String value) {
value = (value != null) ? value.substring(1, value.length() - 1) : null;
value = (value != null && !value.equalsIgnoreCase("null")) ? value.substring(1, value.length() - 1) : null;
resultCallback.onReceiveValue(value);
}
});