[IMP] web_widget_numeric_step: display always on mobile

Mobile screens benefit most from this module's enhanced usability.

However, since the events used for displaying/hiding the +/- buttons depend on mouse, at the end you'll never see these buttons on mobile screens.

Thus, here's a new approach: smaller screens *always* display the buttons.

Besides, inputmode is now decimal, just like upstream float fields.

@moduon MT-4396
This commit is contained in:
Jairo Llopis
2023-12-12 09:50:16 +00:00
parent b310f654b8
commit d914b4eadc
2 changed files with 5 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
t-on-mouseleave="_onFocusOutInput"
t-on-mouseenter="_onFocusInput"
>
<div class="input-group-prepend d-none widget_numeric_step_btn">
<div class="input-group-prepend d-lg-none widget_numeric_step_btn">
<button
class="fa fa-minus btn btn-default btn_numeric_step"
aria-label="Minus"
@@ -27,11 +27,12 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
t-att-placeholder="props.placeholder"
t-att-type="props.inputType"
class="o_input input_numeric_step"
inputmode="decimal"
t-att-step="props.step"
t-on-keydown="_onKeyDown"
t-on-wheel="_onWheel"
/>
<div class="input-group-append d-none widget_numeric_step_btn">
<div class="input-group-append d-lg-none widget_numeric_step_btn">
<button
class="fa fa-plus btn btn-default btn_numeric_step"
aria-label="Plus"