Commit 735ec4fc authored by tedchoc's avatar tedchoc Committed by Commit bot

Do not attempt to show the paste popup if the view is detached.

BUG=581949

Review URL: https://codereview.chromium.org/1648783003

Cr-Commit-Position: refs/heads/master@{#372188}
parent 7fd54765
......@@ -2539,6 +2539,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
}
private boolean showPastePopup(int x, int y) {
if (mContainerView.getParent() == null || mContainerView.getVisibility() != View.VISIBLE) {
return false;
}
if (!mHasInsertion || !canPaste()) return false;
final float contentOffsetYPix = mRenderCoordinates.getContentOffsetYPix();
getPastePopup().show(x, (int) (y + contentOffsetYPix));
......
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