Improve label create picker interactions on touch devices
This commit is contained in:
@@ -258,6 +258,8 @@ export function renderLabelCreatePage() {
|
|||||||
<button
|
<button
|
||||||
class="list-group-item list-group-item-action"
|
class="list-group-item list-group-item-action"
|
||||||
type="button"
|
type="button"
|
||||||
|
@mousedown.prevent
|
||||||
|
@touchstart.prevent="pickLocation(location)"
|
||||||
@click="pickLocation(location)"
|
@click="pickLocation(location)"
|
||||||
:style="locationItemStyle(location)"
|
:style="locationItemStyle(location)"
|
||||||
>
|
>
|
||||||
@@ -313,6 +315,8 @@ export function renderLabelCreatePage() {
|
|||||||
type="text"
|
type="text"
|
||||||
inputmode="numeric"
|
inputmode="numeric"
|
||||||
x-model="form.expireDays"
|
x-model="form.expireDays"
|
||||||
|
@focus="expireDaysFieldFocused = true"
|
||||||
|
@blur="expireDaysFieldFocused = false"
|
||||||
@input="onExpireDaysInput()"
|
@input="onExpireDaysInput()"
|
||||||
@click="openExpireDaysPicker()"
|
@click="openExpireDaysPicker()"
|
||||||
@keydown.escape="expireDaysPickerOpen = false"
|
@keydown.escape="expireDaysPickerOpen = false"
|
||||||
@@ -355,7 +359,7 @@ export function renderLabelCreatePage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template x-if="isCompactExpireDaysLayout()">
|
<template x-if="isCompactExpireDaysLayout() && expireDaysFieldFocused">
|
||||||
<div class="expiration-days-inline mt-2">
|
<div class="expiration-days-inline mt-2">
|
||||||
<div class="small text-body-secondary mb-2">Quick picks</div>
|
<div class="small text-body-secondary mb-2">Quick picks</div>
|
||||||
<div class="expiration-days-grid expiration-days-grid-inline">
|
<div class="expiration-days-grid expiration-days-grid-inline">
|
||||||
@@ -527,6 +531,7 @@ export function labelCreatePageData(store) {
|
|||||||
locationPickerOpen: false,
|
locationPickerOpen: false,
|
||||||
quantityUnitPickerOpen: false,
|
quantityUnitPickerOpen: false,
|
||||||
expireDaysPickerOpen: false,
|
expireDaysPickerOpen: false,
|
||||||
|
expireDaysFieldFocused: false,
|
||||||
previewUrl: '',
|
previewUrl: '',
|
||||||
successMessage: '',
|
successMessage: '',
|
||||||
submitError: '',
|
submitError: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user