naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

[NInputNumber] Strange loop when @update:value

Open vicenterusso opened this issue 2 years ago • 3 comments

TuSimple/naive-ui version (版本)

2.25.3

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

Tested on Chrome and Firefox

System and its version (系统及其版本)

Linux Fedora 36

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/gallant-bassi-d5cr5i?file=/src/Demo.vue

Reappearance steps (重现步骤)

Source: https://codesandbox.io/s/gallant-bassi-d5cr5i?file=/src/Demo.vue

To reproduce:

  1. Open link [ https://d5cr5i.csb.app/ ]
  2. Open devtools (sometimes it doesnt work with dev tools not present)
  3. Fast click to increase or decrease
  4. Loop starts

Video: https://i.imgur.com/6RU9Vto.mp4

Expected results (期望的结果)

Expected no loop behaviour

Actual results (实际的结果)

Loop starts when fast click

Remarks (补充说明)

Bug happens from version 2.25.3 to the latest.

vicenterusso avatar Jul 22 '22 20:07 vicenterusso

I can't reproduce it but it may be relevant with https://github.com/TuSimple/naive-ui/pull/3333

Maybe you can change node_modules's code and see if the issue is still there.

If it's fixed, that patch would be released in next version.

07akioni avatar Jul 24 '22 15:07 07akioni

I managed to repod it, with a macro that presses 30 times (every 2ms).

OrbisK avatar Jul 28 '22 16:07 OrbisK

I confirm it's not fixed, version 2.32.1

vicenterusso avatar Aug 03 '22 00:08 vicenterusso

Confirmed: Fixed

vicenterusso avatar Aug 29 '22 21:08 vicenterusso