Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed clear button isn't clickable issue when inputting long single line text #183

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,9 @@ public boolean onTouchEvent(MotionEvent event) {
if (insideClearButton(event)) {
clearButtonTouched = true;
clearButtonClicking = true;
return true;
}
return true;
break;
case MotionEvent.ACTION_MOVE:
if (clearButtonClicking && !insideClearButton(event)) {
clearButtonClicking = false;
Expand Down Expand Up @@ -1504,8 +1505,8 @@ public boolean onTouchEvent(MotionEvent event) {
private boolean insideClearButton(MotionEvent event) {
float x = event.getX();
float y = event.getY();
int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding));
int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding);
int startX = iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding);
int endX = iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding;
int buttonLeft;
if (isRTL()) {
buttonLeft = startX;
Expand Down