Skip to content

Commit

Permalink
Merge pull request #671 from MrNinja/master
Browse files Browse the repository at this point in the history
[mod] Fix all issues relate to long click in Android version 7.0 (#657, #527)
  • Loading branch information
pichillilorenzo authored Feb 9, 2021
2 parents 0e4e165 + 3457a23 commit 1c0f934
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,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 @@ -2068,7 +2068,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 1c0f934

Please # to comment.