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

Revert "fix(ios): ios click speed" #14153

Merged
merged 1 commit into from
Dec 12, 2024
Merged
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
10 changes: 6 additions & 4 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,6 @@ - (UITapGestureRecognizer *)singleTapRecognizer
{
if (singleTapRecognizer == nil) {
singleTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(recognizedTap:)];
[singleTapRecognizer setNumberOfTapsRequired:1];
[self configureGestureRecognizer:singleTapRecognizer];
[self addGestureRecognizer:singleTapRecognizer];
if (doubleTapRecognizer != nil) {
Expand Down Expand Up @@ -1435,8 +1434,6 @@ - (void)recognizedTap:(UITapGestureRecognizer *)recognizer
[proxy fireEvent:@"dblclick" withObject:event propagate:YES];
}
[proxy fireEvent:@"doubletap" withObject:event];
} else if ([recognizer numberOfTapsRequired] == 1 && [proxy _hasListeners:@"click"]) {
[proxy fireEvent:@"click" withObject:event propagate:YES];
} else {
[proxy fireEvent:@"singletap" withObject:event];
}
Expand Down Expand Up @@ -1612,7 +1609,12 @@ - (void)processTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
// Click handling is special; don't propagate if we have a delegate,
// but DO invoke the touch delegate.
// clicks should also be handled by any control the view is embedded in.
if ([touch tapCount] == 2 && [proxy _hasListeners:@"dblclick"]) {
if ([touch tapCount] == 1 && [proxy _hasListeners:@"click"]) {
if (touchDelegate == nil) {
[proxy fireEvent:@"click" withObject:evt propagate:YES];
return;
}
} else if ([touch tapCount] == 2 && [proxy _hasListeners:@"dblclick"]) {
[proxy fireEvent:@"dblclick" withObject:evt propagate:YES];
return;
}
Expand Down
Loading