• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

twbs / bootstrap / 28694022821
94%
main: 96%

Build:
Build:
LAST BUILD BRANCH: dev/coliff/v6-more-example-fixes
DEFAULT BRANCH: main
Ran 04 Jul 2026 03:51AM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Jul 2026 03:49AM UTC coverage: 94.167% (-0.01%) from 94.18%
28694022821

push

github

web-flow
OTP: fix click-to-focus and overwrite-on-retype (#42524)

* OtpInput: fix click-to-focus and overwrite-on-retype

The single-input rewrite left two interaction gaps: clicking a slot
didn't position the caret there (slots had pointer-events: none and
focus always jumped to the end), and retyping inserted instead of
overwriting, so preceding digits shifted along.

Keep the single accessible input but make its interaction faithful to
the input-otp model:

- Represent the active slot as a selection range so the next keystroke
  overwrites a filled slot or appends to an empty one
- Intercept single-char typing and backspace via beforeinput for
  overwrite semantics; paste/autofill/IME still flow through input
- Make slots clickable (pointerdown) to position the caret, clamped to
  the first empty slot
- Land focus on the first empty slot instead of the end; track the caret
  with a document selectionchange listener

* bump bundlewatch

* OTP: focus the input natively on tap to fix iPadOS keyboard dismiss

The slots overlaid the input with pointer-events: none and the JS called
input.focus() programmatically after preventDefault()-ing the tap. On
iPadOS that raises the on-screen keyboard then dismisses it instantly,
because the keyboard must be raised by a genuine, un-prevented gesture on
the input itself.

Let the input receive taps (pointer-events: auto) so focus — and the
keyboard — come from the native gesture. Map the tap's x-coordinate to a
slot and set the caret in the focus handler once focus settles; when
already focused, reposition immediately (preventDefault is safe then).

Reported on iPadOS 26/27 by @coliff.

* Bump bundlewatch

* OtpInput: cover tap-to-focus, beforeinput, and caret behavior

Adds unit tests for the native tap-to-focus (iPadOS keyboard) fix,
beforeinput overwrite/backspace/append semantics, tap clamping, paste
caret placement, selectionchange sync, the public focus() method, and
beforeinput listener cleanup on dispose. Brings b... (continued)

1096 of 1230 branches covered (89.11%)

Branch coverage included in aggregate %.

72 of 74 new or added lines in 1 file covered. (97.3%)

3085 of 3210 relevant lines covered (96.11%)

202.95 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.42
0.08% js/src/otp-input.js
Jobs
ID Job ID Ran Files Coverage
1 28694022821.1 04 Jul 2026 03:51AM UTC 31
94.17
GitHub Action Run
Source Files on build 28694022821
  • Tree
  • List 31
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28694022821
  • b6a33413 on github
  • Prev Build on v6-dev (#28639043208)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc