# 添加自定义区块字段的行为很奇怪

**URL:** https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235
**Category:** UX
**Tags:** sidebar, fixed
**Created:** [2026年七月10日 04:33 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235 "2026-07-10T04:33:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![one1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/one1/32/493591_2.png) [@one1](https://meta.discourse.org/u/one1)
#### Post date: [2026年七月10日 04:33 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/1 "2026-07-10T04:33:31Z")

</div>

抱歉标题写得不好，不知道该怎么称呼它！

当“添加自定义部分”界面中的某个字段内有文本时，无法选中该文本。不仅如此，也无法将光标置于其中的任何位置。

我使用的是 Windows 11 和 Firefox 152

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2026年七月10日 06:39 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/2 "2026-07-10T06:39:15Z")

</div>

我在我的 MacBook、Linux 机器、iPad 或 iPhone 上的任何论坛或元论坛中都无法复现此问题——在我最新更新的 Discourse 版本中，自定义侧边栏部分字段的表现符合预期。能否请您尝试一下安全模式？

---

<div class="post-metadata">

### Author: ![one1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/one1/32/493591_2.png) [@one1](https://meta.discourse.org/u/one1)
#### Post date: [2026年七月10日 07:08 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/3 "2026-07-10T07:08:30Z")

</div>

我忘了安全模式。谢谢。

不幸的是，在安全模式下我仍然遇到同样的问题。

不过，我 _确实_ 了解到，我看到的“幽灵”图像实际上是重新排序项目的界面。我一直试图选中一行文字，所以从未注意到系统其实是期望我拖动项目到新位置。这说得通吗？

我刚刚在 Chrome 中试了一下，那里没有出现这个问题。

我在元论坛的 Firefox 中也试了一下，遇到了同样的问题：

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/1/4/f14a381c12de667a8564f355e2077a3262c80698.png)

你可以看到指针变成了带有虚线框的箭头，这和点击 _实际_ 拖动手柄时出现的效果一样。

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2026年七月10日 07:30 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/4 "2026-07-10T07:30:00Z")

</div>

这可能是一个 Windows 版 Firefox 的问题，因为无论我使用什么浏览器或设备，它都能正常运行。只是我根本不使用 Windows。

---

<div class="post-metadata">

### Author: ![one1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/one1/32/493591_2.png) [@one1](https://meta.discourse.org/u/one1)
#### Post date: [2026年七月10日 08:15 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/5 "2026-07-10T08:15:11Z")

</div>

好的，我可以看到句柄的父级 `sidebar-section-form-link row-wrapper`（即整行）设置了 `-webkit-user-drag: none;`，而实际的句柄设置了 `-webkit-user-drag: element;`

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/e/1/de1ab9e98f878f958e7a609ffd188ef2255c4114.png)

当然，Windows 上的 Firefox 不支持 WebKit。

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2026年七月13日 07:29 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/6 "2026-07-13T07:29:32Z")

</div>

> [@one1](#):
>
> 当然，Windows 上的 Firefox 不支持 WebKit。

感谢您进行如此彻底的调查！您找到了根本原因。该 bug 在于 `draggable="true"` 被设置在整个行包装器上，而用于抑制非手柄元素拖拽行为的 CSS 属性（`-webkit-user-drag: none`）确实是 Firefox 不支持的属性。Firefox “正确地”将整个行视为可拖拽，从而拦截了您在文本字段上的点击。

已在

> <https://github.com/discourse/discourse/pull/41650>
>
> The implementation relies on a WebKit-only CSS property to suppress draggable="t…rue" from the row. Firefox correctly applies the HTML spec — draggable="true" on the parent means the element and its children initiate a drag on mouse-down, while ignoring \`-webkit-user-drag: none\`, so intercepting any attempt to interact with the \<Input\> fields.
> 
> This commit moves the \`dragStart\` & \` draggable="true"\` to the drag icon. This only appears on desktop, but mobile drag wasn't working anyway since the used native HTML5 drag-n-drop API doesn't fire on touch input so no functionality was changed.

中修复

---

<div class="post-metadata">

### Author: ![one1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/one1/32/493591_2.png) [@one1](https://meta.discourse.org/u/one1)
#### Post date: [2026年七月13日 09:00 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/7 "2026-07-13T09:00:36Z")

</div>

谢谢！！Discourse 开发者在这里如此活跃，真是太棒了。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2026年七月15日 09:22 UTC](https://meta.discourse.org/t/add-custom-section-name-and-link-fields-are-behaving-unexpected/407235/8 "2026-07-15T09:22:58Z")

</div>


