Skip to content

iOS keyboard: every point of the emoji panel takes touches, so a glide can be caught - #2547

Merged
R44VC0RP merged 1 commit into
devfrom
ios-emoji-grid-glide
Nov 23, 2026
Merged

R44VC0RP merged 1 commit into
devfrom
ios-emoji-grid-glide

Conversation

@R44VC0RP

Copy link
Copy Markdown
Collaborator

What the tester felt

TestFlight build 147, iPhone 15 Pro, iOS 27.2.1: "it feels like the animation in the emoji section is not cancelable. So I
have to wait for my swipe animation to happen completely before I can swipe again or modify the scrolling horizontally."

Why

iOS hands a keyboard extension only the touches that land on something its layers draw. The emoji panel and the search's
results row are clear, so a finger landing between two emoji, in the 3–6 pt between two rows or beside a category icon never
reached the keyboard, not even its window: the glide ran to its end, a second fling did nothing, and a swipe that started in
a gap didn't scroll. On an emoji it always worked, which is why it felt random. Not a speed problem: Hex's own work while
gliding is 0.02 ms per frame (median, Release).

The change

An invisible fill (UIColor.keyboardTouchFill, 0.1% black) under the panel's and the results row's clear look. Nothing
else changes; light and dark screenshots of the open panel differ by at most 2/255 on 38–85 of 1.4 million pixels (the
glass's rounded edge).

Verified (iOS 27.2 simulator, Studio load average 55–70)

without the fill with it
iPhone 17 Pro: 12 flings, each caught by a finger mid-glide 4 of 12 flings scrolled at all; 3 of those 4 caught 12 of 12 scrolled, 12 of 12 caught at once, seen 2–16 ms late
iPhone 15 Pro: the same 0 of 12 flings scrolled 12 of 12 scrolled and caught, seen 3–18 ms late
finger in a row gap mid-glide (17 Pro) 0 of 3 reached the keyboard 3 of 3 caught
slow drag from a gap (17 Pro) nothing moved, 3 of 3 scrolled and back, 3 of 3
taps at rest between columns / in row gaps none seen all seen

Baselines: a bare UICollectionView in an app and Apple's emoji keyboard stop a glide at a touch in the same places.

  • New case in EmojiPanelLettersKeyTests: every point 4 pt apart of the open panel and the results row draws; it fails
    without the fill (4,649 and 626 points).
  • Full suite on the Studio on the rebased head (c2b70420 + this): 975 tests, 4 skipped, 0 failures.
  • python3 scripts/code-shape.py --check: passes.
  • ios/docs/keyboard.md (Emoji) says it.

Not changed: the first scroll after opening configures the visible columns in one frame (95 ms once in Debug, 13 ms max in
Release here); a follow-up if it ever shows on a phone.

…e can be caught

TestFlight build 147: "the animation in the emoji section is not cancelable.
So I have to wait for my swipe animation to happen completely before I can
swipe again." iOS hands a keyboard extension only the touches that land on
something its layers draw. The emoji panel and the search's results row are
clear, so a finger landing between two emoji, in the 3-6 pt between two rows
or beside a category icon never reached the keyboard at all (not even its
window): a glide went on to its end, a second fling did nothing, and a swipe
that started in a gap didn't scroll. Where the finger lands on an emoji it
always worked, which is why it felt random.

Both views now have an invisible fill (UIColor.keyboardTouchFill, 0.1% black)
under their clear look. Removed nothing. docs/keyboard.md says why.

Verified on the iOS 27.2 simulator, Studio load average 55-70, with a probe
build that switches the fill (probe in a scratch worktree only):
- iPhone 17 Pro, 12 flings each caught by a finger mid-glide: without the
  fill 4 of 12 flings scrolled at all (the rest started in a gap) and 1 of
  those 4 catches never reached the keyboard; with it 12 of 12 scrolled and
  12 of 12 were caught at once (0 pt further), the touch seen 2-16 ms late.
- iPhone 15 Pro, the same: 0 of 12 flings scrolled without the fill, 12 of
  12 scrolled and were caught with it (seen 3-18 ms late).
- A finger in a row gap mid-glide: 0 of 3 reached the keyboard before, 3 of 3
  caught after. A slow drag from a gap: did nothing (3 of 3) before, scrolled
  210 pt and back (3 of 3) after. Taps at rest in gaps: none seen before,
  all after.
- Apple's emoji keyboard and a bare UICollectionView in an app stop a glide
  at a touch in the same places.
- The panel looks the same: light and dark screenshots differ by at most
  2/255 on 38-85 of 1.4 million panel pixels (the glass's rounded edge).
- New case in EmojiPanelLettersKeyTests: every point 4 pt apart of the open
  panel and the results row draws; it fails without the fill (4,649 and 626
  points).
@R44VC0RP
R44VC0RP merged commit 7b81931 into dev Nov 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant