Skip to content

Commit

Permalink
fix(popover): log warnings to console when manually set same zindex o…
Browse files Browse the repository at this point in the history
…n multile instances and closes them, closes #2050
  • Loading branch information
07akioni committed Dec 27, 2021
1 parent 1613b17 commit 8e18cae
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- Fix `n-image` may keep keyboard handler after mounted.
- Fix `n-image` can't exit preview after esc is pressed when there's only 1 image, closes [#2042](https://github.com/TuSimple/naive-ui/issues/2042).
- Fix `n-drawer-content`'s content doesn't scroll by default, ref [#2003](https://github.com/TuSimple/naive-ui/issues/2003).
- Fix `n-popover` log warnings to console when manually set same zindex on multile instances and closes them, closes [#2050](https://github.com/TuSimple/naive-ui/issues/2050).

## 2.23.1 (2021-12-20)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- 修复 `n-image` 卸载时可能未解绑键盘事件监听器
- 修复 `n-image` 在仅有一张图片时按 esc 无法退出预览,关闭 [#2042](https://github.com/TuSimple/naive-ui/issues/2042)
- 修复 `n-drawer-content` 的内容区域默认无法滚动,关于 [#2003](https://github.com/TuSimple/naive-ui/issues/2003)
- 修复 `n-popover` 手动指定多个 popover 有 相同 zindex 并关闭时控制台打印错误,关闭 [#2050](https://github.com/TuSimple/naive-ui/issues/2050)

## 2.23.1 (2021-12-20)

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@babel/parser": "^7.12.11",
"@babel/preset-env": "^7.12.10",
"@babel/traverse": "^7.12.12",
"@emotion/hash": "^0.8.0",
"@rollup/plugin-babel": "^5.3.0",
"@types/estree": "^0.0.50",
"@types/jest": "^27.0.1",
Expand Down Expand Up @@ -113,8 +114,7 @@
"typescript": "^4.4.2",
"vite": "^2.1.3",
"vue": "^3.2.12",
"vue-router": "^4.0.5",
"@emotion/hash": "^0.8.0"
"vue-router": "^4.0.5"
},
"peerDependencies": {
"vue": "^3.0.0"
Expand All @@ -134,7 +134,7 @@
"lodash-es": "^4.17.21",
"seemly": "^0.3.3",
"treemate": "^0.3.9",
"vdirs": "^0.1.4",
"vdirs": "^0.1.5",
"vfonts": "^0.1.0",
"vooks": "^0.2.12",
"vueuc": "^0.4.19-1"
Expand Down
1 change: 1 addition & 0 deletions src/popover/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ hoist-debug
nested-debug
nested2-debug
nested3-debug
zindex-debug.vue
```

## API
Expand Down
32 changes: 32 additions & 0 deletions src/popover/demos/zhCN/zindex-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<markdown>
# Zindex debug
</markdown>

<template>
<n-space>
<n-popover trigger="click" :z-index="3000">
<template #trigger>
<n-button>Hover</n-button>
</template>
<span>I wish they all could be California girls</span>
<n-popover trigger="click" :z-index="3000">
<template #trigger>
<n-button>Click</n-button>
</template>
<span>I wish they all could be California girls</span>
</n-popover>
</n-popover>
</n-space>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
export default defineComponent({
setup () {
return {
showPopover: ref(false)
}
}
})
</script>

0 comments on commit 8e18cae

Please sign in to comment.