Skip to content

Commit

Permalink
feat: force input numeric keyboard on mobile device (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht authored Jul 24, 2022
1 parent f23fe1d commit 2a21361
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/apps/ui/components/dashboard/SessionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,6 @@ async function handleDeleteSession() {
type="number"
inputmode="numeric"
pattern="[1-9]*"
title="Non-negative integral number"
required
:disabled="addASetLoading"
/>
Expand All @@ -1073,6 +1072,8 @@ async function handleDeleteSession() {
id="weight"
class="form-control form-control-sm"
type="number"
inputmode="numeric"
pattern="[1-9]*"
min="1"
required
:disabled="addASetLoading"
Expand All @@ -1086,10 +1087,12 @@ async function handleDeleteSession() {
v-model.number="set.rpe"
id="rpe"
class="form-control form-control-sm"
type="number"
min="1"
step=".5"
max="10"
inputmode="numeric"
pattern="[1-10]*"
type="number"
:disabled="addASetLoading"
/>
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/apps/ui/components/dashboard/headers/SessionsHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ async function addASession() {
id="session-header-bodyweight"
class="form-control form-control-sm"
min="1"
inputmode="numeric"
pattern="[1-10]*"
type="number"
:disabled="loading"
/>
Expand All @@ -280,6 +282,8 @@ async function addASession() {
class="form-control form-control-sm"
min="1"
type="number"
inputmode="numeric"
pattern="[0-24]*"
:disabled="loading"
/>
</div>
Expand All @@ -297,6 +301,8 @@ async function addASession() {
class="form-control form-control-sm"
min="1"
type="number"
inputmode="numeric"
pattern="[1-10000]*"
:disabled="loading"
/>
</div>
Expand All @@ -310,6 +316,8 @@ async function addASession() {
class="form-control form-control-sm"
min="1"
type="number"
inputmode="numeric"
pattern="[1-10000]*"
:disabled="loading"
/>
</div>
Expand Down

0 comments on commit 2a21361

Please sign in to comment.