# DiscourseHub 上的网站与 iPhone 14 Pro Max 的顶部栏元素冲突

**URL:** https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268
**Category:** Bug
**Tags:** discourse-hub, ios-app
**Created:** [2022年九月17日 10:24 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268 "2022-09-17T10:24:35Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2022年九月17日 10:24 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/1 "2022-09-17T10:24:35Z")

</div>

Safari 上的网站没问题：

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/5/0/050b0c27d28475bfd43253c0bfd02663dfc62cf8.jpeg)

而通过 DiscourseHub 访问的相同网站则在屏幕顶部发生冲突：

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/6/6/f66233ffdde45907bd8a83ba4fca673b33977c3c.jpeg)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/1/2/7/1276148408c7e520b7b534743b7a98f19757c9b1.jpeg)

正在测试浅色和聚焦侧边栏主题。

由于它们这样重叠，网站顶部的任何内容都很难激活。

iPhone 14 Pro Max，iOS 16.0.1（当前零售版）。

---

<div class="post-metadata">

### Author: ![spdegabrielle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spdegabrielle/32/190784_2.png) [@spdegabrielle](https://meta.discourse.org/u/spdegabrielle)
#### Post date: [2022年九月17日 10:27 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/2 "2022-09-17T10:27:38Z")

</div>

我刚刚在 [Titlebar is not displaying properly - #13 by spdegabrielle](https://meta.discourse.org/t/titlebar-is-not-displaying-properly/238896/13?u=spdegabrielle) 上发表了评论，但现在我看到了你的帖子，我认为它们可能有关联。

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2022年九月17日 10:33 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/3 "2022-09-17T10:33:26Z")

</div>

我也参与了那个，它更多地与聚焦侧边栏主题有关。这个是硬件特定的。因此，我上面的一张截图同时展示了两者。

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2022年九月17日 11:52 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/6 "2022-09-17T11:52:49Z")

</div>

感谢 @Stephen - 我们正在准备一个修复程序，发布后会在此处更新

> <https://github.com/discourse/DiscourseMobile/commit/fe82683cffaac803d6f53f4746f5b60844bac627>
>
> Fixes the webview padding on iPhone 14 Pro

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [2022年九月17日 13:30 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/8 "2022-09-17T13:30:18Z")

</div>

很难说，但这和我在这里看到的 [https://community.wanikani.com/](https://community.wanikani.com/) 一样吗？区别在于，我在桌面和移动浏览器上都看到了这个（我不使用 DiscourseHub），所以我不确定。

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/e/c/bec0bd4babdf49eeb8c9d1ef4f3565a92c5c2e44.png)

---

<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: [2022年九月17日 16:11 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/9 "2022-09-17T16:11:25Z")

</div>

我认为这是因为在 logo 上使用了 `height: 100%`。

```scss
.d-header {
  #site-logo.logo-big {
    height: 100%;
  }
}

```

也许应该在核心的 `#site-logo` 中添加 `max-height: var(--header-offset)` 以防止这种情况。🤔

快速修复 🔽

> **从您的自定义主题中删除这些**
>
> 来自桌面 `theme_1`  
> ![Screenshot 2022-09-17 at 17.42.59](https://global.discourse-cdn.com/meta/original/4X/0/0/7/0076a721e2c7706bfe6b9c87a9bb5e5c26fbc36c.png)
> 
> ```scss
> .d-header {
> #site-logo.logo-big {
> height: 100%;
> }
> }
> 
> ```
> 
> 以及来自移动设备 `theme_1`  
> ![Screenshot 2022-09-17 at 17.46.52](https://global.discourse-cdn.com/meta/original/4X/5/8/6/5868c04d2f35b7c6f707071d0e0acb6db9282837.png)
> 
> ```scss
> .d-header {
> #site-logo {
> height: 100%;
> max-height: 100%;
> }
> }
> 
> ```

> **添加到您的自定义主题中**
>
> 添加到通用部分 🔽
> 
> ```scss
> .d-header {
> #site-logo {
> height: 100%;
> max-height: var(--header-offset);
> }
> }
> 
> ```
> 
> 添加到桌面 🔽
> 
> ```scss
> .d-header {
> #site-logo.logo-small {
> height: 2.667em;
> }
> }
> 
> ```
> 
> 添加到移动设备部分 🔽
> 
> ```scss
> .d-header {
> .title {
> max-width: 100%;
> #site-logo.logo-small {
> max-height: 2.4em;
> }
> }
> }
> 
> ```

进行这些更改后 🔽

桌面:

 ![Screenshot 2022-09-17 at 18.02.14](https://global.discourse-cdn.com/meta/original/4X/2/0/7/207b8a16de798b7f835d736aa9ddde65181b834a.png)

移动设备:  
 ![Screenshot 2022-09-17 at 18.04.00](https://global.discourse-cdn.com/meta/original/4X/3/e/f/3ef7e0c22333f148d1bc492368da0a593bca96a3.png)

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [2022年九月17日 17:16 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/10 "2022-09-17T17:16:29Z")

</div>

谢谢你的建议。不幸的是，我不是该网站的管理员，所以我无能为力。

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2022年九月23日 00:11 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/11 "2022-09-23T00:11:58Z")

</div>

Discourse Hub 更新已在 iOS App Store 上架，一切又恢复正常了。

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [2022年九月23日 01:23 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/12 "2022-09-23T01:23:21Z")

</div>

我认为这可能是 iOS 16？我看到你正在使用它，今天我在 Roblox 上遇到了这个问题。

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/0/e/50e4a143cb5007036b90f0d4440c4f5dba2c3c37.jpeg)

---

<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: [2022年九月28日 12:28 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/15 "2022-09-28T12:28:11Z")

</div>

Discourse Hub 1.8.3 已发布，支持 iPhone 14 Pro！

请告知是否有论坛标题与 iOS 界面之间存在更多冲突。😃 (不只是在最新的 iPhone 上)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2022年九月28日 12:29 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/16 "2022-09-28T12:29:07Z")

</div>

是六天前的发布，还是另一个？

---

<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: [2022年九月28日 12:31 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/17 "2022-09-28T12:31:07Z")

</div>

是的，就是那个！

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/2/7/827df355506dd44bf86c873437ba3990810f105b.png)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2022年十月3日 13:59 UTC](https://meta.discourse.org/t/sites-via-discoursehub-clashing-with-top-bar-elements-on-iphone-14-pro-max/239268/18 "2022-10-03T13:59:52Z")

</div>


