tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.11k stars 1.67k forks source link

动态标签 Dynamic Tags删除标签时,焦点会被聚焦到已删除标签的位置上 #4555

Open maddenBoy opened 1 year ago

maddenBoy commented 1 year ago

TuSimple/naive-ui version (版本)

2.34.3

Vue version (Vue 版本)

3.3.0-alpha.4

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

Chrome(110.0.5481.178)

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

Window11

Node version (Node 版本)

Reappearance link (重现链接)

https://www.naiveui.com/zh-CN/light/components/dynamic-tags

Reappearance steps (重现步骤)

点击动态标签的×,对标签进行删除

Expected results (期望的结果)

动态标签 Dynamic Tags删除标签时,焦点不会被聚焦到已删除标签的位置上(感觉这样的体验不是很好)

Actual results (实际的结果)

动态标签 Dynamic Tags删除标签时,焦点会被聚焦到已删除标签的位置上

Remarks (补充说明)

视频

test.webm

Th1Humble commented 8 months ago

in the file src\_internal\close\src\styles\index.cssr.ts maybe delete the 👇 code can fix the bug? tryed yet or blur the event when clicked~

c('&:focus::before', `
      background-color: var(--n-close-color-hover);
    `),