williamtroup / Calendar.js

📅 A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.
https://calendar-js.com
MIT License
478 stars 33 forks source link

The value increases or decreases rapidly after clicking the button. #207

Closed ZhangChengLin closed 7 months ago

ZhangChengLin commented 7 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. After clicking the up arrow, the number will automatically increase by 1
  2. In the case of continuous increase, move the mouse to the down arrow, and the number will automatically decrease by 1 until it reaches the minimum value of 1
  3. Only when you click on a blank space will the number stop changing.
  4. The expectation should be to click once to increase a value. Rather than the current rapid increase or decrease.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

ZhangChengLin commented 7 months ago

This may happen to all input elements of type number.

image

@williamtroup

The original intention of this picture is that the two buttons on the right side of the input box in the first picture will also happen. After clicking the button once, the value will continue to change, instead of changing once with one click. For your update, does this position allow negative values, I don't know if it can be negative.

williamtroup commented 7 months ago

This is not related to the calendar itself, as I have reproduced it in chrome with the calendar available.

ZhangChengLin commented 7 months ago

https://github.com/williamtroup/Calendar.js/assets/30773389/cf55a9ef-5977-47d9-bc7b-c063907f4de4

This is a video example. When I was in the alarm offset input box, I only clicked the two up and down arrow buttons once. The rest of the time I moved the mouse pointer over them without clicking. But the numbers in the input box do keep changing.

Finally, after clicking the left mouse button once in the blank space, the value stopped changing.