Skip to content

fix: add numeric keypad hints for weight and repetitions fields on mobile#1273

Open
Mehak-mahajan wants to merge 1 commit into
wger-project:masterfrom
Mehak-mahajan:fix/numeric-keypad-workout-log
Open

fix: add numeric keypad hints for weight and repetitions fields on mobile#1273
Mehak-mahajan wants to merge 1 commit into
wger-project:masterfrom
Mehak-mahajan:fix/numeric-keypad-workout-log

Conversation

@Mehak-mahajan

Copy link
Copy Markdown

Fixes #2409 (wger-project/wger)

Problem

On mobile browsers (iOS Safari, Chrome), the workout log input fields
for repetitions and weight show a full text keyboard instead of a
numeric keypad, making it slower to enter values during workouts.

Solution

Added inputMode hints to the input fields:

  • repetitions field: inputMode="numeric"
  • weight field: inputMode="decimal"

This tells mobile browsers to show the appropriate numeric keypad
while preserving existing functionality.

Testing

Tested on mobile browser - numeric keypad now appears when tapping
weight and repetitions fields.

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.394%. remained the same — Mehak-mahajan:fix/numeric-keypad-workout-log into wger-project:master

}
},
htmlInput:{
inputMode: 'numeric'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better make this a decimal as well (while it's true that you can't do partial repetitions, this field is also used for other units such as "meters", where it does make sense)

@rolandgeider

Copy link
Copy Markdown
Member

Hey! Thanks for the PR! I just left you a small nitpick.

Another thing, if you have the motivation, do you want to check other places where we enter numbers? We'd have the same problem with the keyboard there as well

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.

3 participants