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

iOS: can click speed be improved? #14051

Open
1 task done
m1ga opened this issue May 31, 2024 · 1 comment · May be fixed by #14154
Open
1 task done

iOS: can click speed be improved? #14051

m1ga opened this issue May 31, 2024 · 1 comment · May be fixed by #14154
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers

Comments

@m1ga
Copy link
Contributor

m1ga commented May 31, 2024

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

If you run this simple app on Android and iOS you'll see that the click event on Android fires quicker:

const win = Ti.UI.createWindow();
win.addEventListener("click", function(e) {
	console.log("click")
})


win.open();

I briefly looked into the iOS code and found:

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;
}
}

If I add another

else if ([touch tapCount] >= 2 && [proxy _hasListeners:@"click"]) { ... }

and fire a click event inside that I can click the window a lot quicker and receive click events on iOS. Has this been done on purpose?

Workaround is to use singleTap on iOS

Expected Behavior

Fire click event as fast as the user clicks

Actual behavior

small cool-down between the clicks is needed on iOS.

Reproducible sample

const win = Ti.UI.createWindow();
win.addEventListener("click", function(e) {
	console.log("click")
})


win.open();

Steps to reproduce

  • click the window and watch the logs

Platform

iOS

SDK version you are using

12.3.1

Alloy version you are using

No response

@m1ga m1ga added bug needs triage This issue hasn't been reviewed by maintainers ios labels May 31, 2024
@m1ga
Copy link
Contributor Author

m1ga commented Sep 16, 2024

fixed in #14115

@m1ga m1ga closed this as completed Sep 16, 2024
@m1ga m1ga reopened this Dec 12, 2024
@m1ga m1ga linked a pull request Dec 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant