Added inputmode attribute to show appropriate mobile keyboard for selected field

This commit is contained in:
Robin Klaus
2020-05-06 12:46:37 +10:00
parent bf0b941e1c
commit 7dce53a77b
4 changed files with 8 additions and 2 deletions

View File

@@ -20,6 +20,7 @@
type: "email",
id: "email",
tabindex: 1,
inputmode: "email",
"ng-model" => "spree_user.email"}
.row
.large-12.columns

View File

@@ -15,6 +15,7 @@
type: "email",
id: "email",
tabindex: 1,
inputmode: "email",
"ng-model" => "spree_user.email"}
.row
.large-12.columns
@@ -24,6 +25,7 @@
id: "password",
autocomplete: "off",
tabindex: 2,
inputmode: "password",
"ng-model" => "spree_user.password"}
.row
.large-12.columns

View File

@@ -14,6 +14,7 @@
type: "email",
id: "email",
tabindex: 1,
inputmode: "email",
"ng-model" => "spree_user.email"}
%span.error{"ng-show" => "errors.email != null"}
{{ errors.email.join(' ') }}
@@ -25,6 +26,7 @@
id: "password",
autocomplete: "off",
tabindex: 2,
inputmode: "password",
"ng-model" => "spree_user.password"}
%span.error{"ng-show" => "errors.password != null"}
{{ errors.password.join(' ') }}
@@ -36,6 +38,7 @@
id: "password_confirmation",
autocomplete: "off",
tabindex: 2,
inputmode: "password",
"ng-model" => "spree_user.password_confirmation"}
.row
.large-12.columns

View File

@@ -21,10 +21,10 @@
.row
.small-6.columns
= validated_input t(:email), 'order.email', type: :email, "ofn-focus" => "accordion['details']"
= validated_input t(:email), 'order.email', type: "email", inputmode: "email", "ofn-focus" => "accordion['details']"
.small-6.columns
= validated_input t(:phone), 'order.bill_address.phone'
= validated_input t(:phone), 'order.bill_address.phone', inputmode: "tel"
.row
.small-12.columns.text-right