Skip to content

Commit

Permalink
Check if the collapse action is available before calling collapseEnd (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Feb 6, 2020
1 parent d2c3be6 commit d579d88
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -1801,9 +1801,9 @@ public void onAction(String action) {
@Override
public void onDismiss() {
if (aSelection.isActionAvailable(GeckoSession.SelectionActionDelegate.ACTION_UNSELECT)) {
aSelection.execute(GeckoSession.SelectionActionDelegate.ACTION_UNSELECT);
} else {
aSelection.collapseToEnd();
aSelection.unselect();
} else if (aSelection.isActionAvailable(GeckoSession.SelectionActionDelegate.ACTION_COLLAPSE_TO_END)) {
aSelection.collapseToEnd() ;
}

aSelection.hide();
Expand Down

0 comments on commit d579d88

Please sign in to comment.