# 标题和其他元素前面的自定义状态消息

**URL:** <https://meta.discourse.org/t/custom-status-message-in-front-of-header-and-other-elements/273320>\
**Category:** Bug\
**Tags:** mobile, user-status\
**Created:** [2023 年7 月 31 日 08:01 UTC](https://meta.discourse.org/t/custom-status-message-in-front-of-header-and-other-elements/273320 "2023-07-31T08:01:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

作者： ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)\
发布日期： [2023 年8 月 4 日 20:01 UTC](https://meta.discourse.org/t/custom-status-message-in-front-of-header-and-other-elements/273320/7 "2023-08-04T20:01:39Z")

</div>

我查看了一下。有两点很重要：

1. 这只发生在移动设备上
2. 这不仅发生在用户状态工具提示上，还发生在一些使用 [DTooltip](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/d-tooltip.gjs) 组件实现的工具提示上

在桌面端，我们使用 `mouseenter` 事件作为工具提示的触发器。当鼠标离开工具提示时，它会消失，所以一切都很顺利。

在移动端，工具提示的触发器是点击，用户需要点击工具提示外部才能让工具提示消失。因此，当滚动时，工具提示不会消失。这是我们使用的 `tippy.js` 库实现的工具提示的默认行为。

我目前正在处理修复，并且已经有了一个可行的草稿。解决方案将在移动端滚动时隐藏工具提示。这将修复所有基于 `DTooltip` 的工具提示。

---

_[View the full topic](https://meta.discourse.org/t/custom-status-message-in-front-of-header-and-other-elements/273320)._
