# Usercards 上边框在页面切换时不消失

**URL:** https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635
**Category:** UX
**Tags:** completed, user-card
**Created:** [2024年五月11日 08:19 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635 "2024-05-11T08:19:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2024年五月11日 08:19 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/1 "2024-05-11T08:19:27Z")

</div>

当从用户卡片打开用户个人资料时，之后会有一行。要重现，请使用出现在顶部的用户卡片。否则，您将不得不滚动才能找到该行。

---

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [2024年五月11日 09:14 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/2 "2024-05-11T09:14:17Z")

</div>

我也遇到同样的问题。（点击任何地方都可以消除该行。）

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2024年五月11日 11:24 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/3 "2024-05-11T11:24:24Z")

</div>

DMenu 似乎没有完全关闭，直到您单击外部。

这是此 PR 的副作用：

> <https://github.com/discourse/discourse/commit/fe16633a0c018156d88530b979ee2164107c7416>
>
> menus and tooltips are now appended to their own portals. The service are the on…ly responsible for managing the instances, prior to this commit, services could manage one instance, but the DMenu and DTooltip components could also take over which could cause unexpected states.
> 
> This change also allows nested menus/tooltips.
> 
> Other notable changes:
> 
> \- few months ago core copied the CloseOnClickOutside modifier of float-kit without removing the float-kit one, this commit now only use the core one.
> \- the close function is now trully async
> \- the close function accepts an instance or an identifier as parameter

---

<div class="post-metadata">

### Author: ![Noah](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@Noah](https://meta.discourse.org/u/Noah)
#### Post date: [2024年五月27日 23:21 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/5 "2024-05-27T23:21:30Z")

</div>

我也遇到了同样的问题。

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [2024年六月9日 04:28 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/6 "2024-06-09T04:28:38Z")

</div>

你好 👋 是的，我也注意到了这一点。  
它可以用 🔽 来定位。

```css
#user-card,
#group-card {
  &:empty {
    display: none;
  }
}

```

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2024年六月11日 20:55 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/7 "2024-06-11T20:55:47Z")

</div>

看起来有修复程序即将到来！

> <https://github.com/discourse/discourse/commit/1ecfc397d36536795824d5b46d7687a5f76778f4>

---

<div class="post-metadata">

### Author: ![cvx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cvx/32/152146_2.png) [@cvx](https://meta.discourse.org/u/cvx)
#### Post date: [2024年六月12日 21:59 UTC](https://meta.discourse.org/t/usercards-upper-border-does-not-disappear-on-page-change/307635/8 "2024-06-12T21:59:50Z")

</div>

此主题已在 24 小时后自动关闭。不再允许回复。
