The Focus Timer's Number Fields Are Two Inputs Each, and a Scripted Value Does Not Get Clamped

The Focus Timer's Number Fields Are Two Inputs Each, and a Scripted Value Does Not Get Clamped

OnePassApps

One field, two inputs

I work on OnePassApps, and the Focus Timer is one of the browser tools we ship at app.onepassapps.com. This is about how its number fields are built, which is a different question from what the timer does with a wrong number - the full write-up of that measurement is on Dev.to: the Focus Timer's number contract on Dev.to.

Each of the four Pomodoro fields is two inputs, not one. The box you see and type in is a text input with an accessible name - Focus, Short break, Long break, Long break every - and it carries no minimum, no maximum and no step of its own. In the same field container sits a second input, a number input 1 pixel wide and 1 pixel tall, and that is where the range is written down: 1 to 180 for Focus, 1 to 60 for Short break, 1 to 120 for Long break and 2 to 12 for Long break every, each with a step of 1. Beside each field sit two small buttons, Increase and Decrease, four pairs in all.

The fix arrives on the keyboard path

Typing 181 into Focus and pressing Tab leaves the field reading 180. 181 in Short break becomes 60, 181 in Long break becomes 120, and 13 in Long break every becomes 12. Nothing is printed about it: the panel shows no message, and the four number inputs then read 180, 60, 120 and 12.

Setting the same value from a script is a different thing. I set the Focus field to 181 with the native value setter and fired input and change events on it, and the field still read 181 afterwards. So the silent fix belongs to the path a person takes: type a number, move the focus away, and the field settles on the nearest legal value. One build, one browser, one signed-out session, 11 November 2026.

The countdown carries a different set of fields

Switching to Countdown replaces the four fields with three - Hours, Minutes and Seconds, starting at 0, 10 and 0 - and the ranges move with them: 0 to 24, 0 to 59 and 0 to 59. Typing 25 into Hours leaves 24, 60 into Minutes leaves 59 and 60 into Seconds leaves 59. The two small buttons come with them as well, three pairs instead of four.

The line under the fields changes at the ceiling

At the defaults the line under the countdown fields reads: From 1 second up to 24 hours. Once Hours sits at its ceiling of 24, the same line reads: A countdown can be at most 24 hours. Two sentences, one control, and which one you get depends on whether you are at the top of the range.

One option belongs to one mode

The Options list differs between the two modes. In Pomodoro it carries three checkboxes: Start the next phase automatically, Play a chime when time is up, and Show a browser notification. In Countdown the auto-advance option is not there at all, and the list starts at the chime. A countdown has no phases to advance through, which is a fair reason for it to be gone, but the panel does not say so.

The floor is one second

Set Hours, Minutes and Seconds all to zero and the Start button is disabled; set Seconds to 1 and it comes back. I ran that one second countdown to its end and the button came back as Start again.

The Focus Timer runs in the browser tab, and the plan the page shows is free: Standard is free, with No card required. Open the timer here: app.onepassapps.com/apps/focus-timer. The written guide is at: the Focus Timer guide.

I work on OnePassApps, and I write here as the team, so questions about how the apps work are welcome, and corrections are better than praise.

Report Page