Skip to content
Snippets Groups Projects
Commit 28593b53 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix forwarding event only when sending view is visible

Bug: 15579941
Change-Id: I25c19068ae4ad26b1ff64ffccf36ef8dd58ed295
parent c1cb930d
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,12 @@ public final class InputView extends LinearLayout {
@Override
protected boolean needsToForward(final int x, final int y) {
return isInKeyboardTopPadding(y);
// Forwarding an event only when {@link MainKeyboardView} is visible.
// Because the visibility of {@link MainKeyboardView} is controlled by its parent
// view in {@link KeyboardSwitcher#setMainKeyboardFrame()}, we should check the
// visibility of the parent view.
final View mainKeyboardFrame = (View)mSenderView.getParent();
return mainKeyboardFrame.getVisibility() == View.VISIBLE && isInKeyboardTopPadding(y);
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment