osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Improve iOS text input deactivation to not require long delay

Open frenzibyte opened this issue 3 years ago • 4 comments

Something I found which is outdated by now given the refactors of TextInputSource, and which bugged me with its delay on hide (almost feels like the game is slow enough to hide the keyboard). Also resolves the TODO item at the same time.

Before:

https://user-images.githubusercontent.com/22781491/166139753-88cde4d4-786d-4875-9cd2-fd88ff7e7cce.mov

After:

https://user-images.githubusercontent.com/22781491/166139751-2803a330-4200-4660-ac61-44fe7250f9dd.mov

Relying on the InputThread scheduler may feel a bit weird, but it is about the only managed way for letting something wait one frame before it is invoked, and able to be cancelled by other operations beforehand.

frenzibyte avatar May 01 '22 09:05 frenzibyte

Is this PR superseded by #5150?

peppy avatar May 03 '22 06:05 peppy

For the most part, if #5150 gets merged then all that's left is just cleaning up iOS here to not have any delay and becoming/resigning first responder directly instead.

frenzibyte avatar May 03 '22 06:05 frenzibyte

So that PR should be merged first?

peppy avatar May 03 '22 06:05 peppy

Yeah, this originally was just working around the issue which that PR intends to actually solve. So since it has been PR'd, I will wait for it to be merged and update this accordingly.

frenzibyte avatar May 03 '22 06:05 frenzibyte