Skip to content

Commit

Permalink
[mod] Fix all issues relate to long click in Android version 7.0 (#657,
Browse files Browse the repository at this point in the history
  • Loading branch information
tranductam2802 committed Feb 8, 2021
1 parent 3f1ed3b commit 3457a23
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ public void adjustFloatingContextMenuPosition() {
@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;
Expand All @@ -1986,7 +1986,7 @@ public void getSelectedText(final ValueCallback<String> resultCallback) {
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);
}
});
Expand Down

0 comments on commit 3457a23

Please # to comment.