-
Notifications
You must be signed in to change notification settings - Fork 10
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
Verify event is not null on touch.js #13
Open
as0ler
wants to merge
2
commits into
nowsecure:main
Choose a base branch
from
as0ler:fix/verify_event_not_null
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, sorry, I'm not sure I understand what happens here. Does
-[UIApplication _touchesEvent]
keep returningnil
or is it a random glitch? If it's the latter I'm wondering if we should make the_touchesEvent()
call earlier, before we dopending.shift()
, and simply return there -- that waydispatchTouch:
gets called again on the next frame, and might succeed that time and keep going. (But if this is a permanent failure, I suppose we should callonComplete()
with anError
so it can reject thePromise
?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It occurs when the application goes to the background for any reason and comes back. So I would say it's happening on a non-predictable manner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I guess the tap down event instantly triggers backgrounding, and in this failure case we get the next
dispatchTouch:
just after the app has gone off screen -- whereas in the happy case we get it after it is back on the screen again.If that is correct, I think we have two options:
pending.shift()
. In this way we will eventually move it through the different phases.pending.length === 0
. In that case we will have to releasepriv.touch
if we already created it.It seems to me that 1) is the right solution, since we will keep going once the app is back on the screen. This is also what happens when we are luckier -- the app goes to the background and
dispatchTouch:
does not get called until it's back on the screen.What do you think, @mrmacete?