fix(ContentToc): Highlighter Positioning Differently in IOS Production
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Environment
| Operating system | Windows 10.0.26200 |
| CPU | Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 cores) |
| Node.js version | v22.19.0 |
| nuxt/cli version | 3.33.1 |
| Package manager | npm@10.9.3 |
| Nuxt version | 4.3.1 |
| Nitro version | 2.13.1 |
| Builder | vite@7.3.1 |
| Config | app, compatibilityDate, css, devtools, gtag, imports, modules, nitro, router, runtimeConfig, site, ui |
| Modules | @nuxt/ui@4.5.1, @nuxt/icon@2.2.1, @nuxt/content@3.9.0, nuxt-easy-lightbox@1.1.0, @pinia/nuxt@0.11.3, @nuxtjs/sitemap@7.5.2, nuxt-gtag@4.1.0 |
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
4.5.1
Reproduction
Sorry, all i had is pictures, the nuxt starter won't work properly in CodeSandbox and ContentToc work't work properly in StackBlitz, but you can visit this site via IOS and desktop device (Squeeze the page width into its minimun) to see what i am saying.
and this is what my code looks like for this specific ContentToc (PS: I don't think is the custom ui property that creates the problem because scroll with IOS device (Iphone specificly) under npm run dev mode is fine) :
<UContentToc
v-model:open="isTocOpen"
@move="isTocOpen = false"
title="┃ 页面导航"
color="neutral"
:links="props.tocLink"
highlight
highlight-color="neutral"
:ui="{
root: 'absolute top-0 w-full backdrop-blur-2xl bg-white/60',
container: '*:data-[slot=trigger]:cursor-pointer',
}"
/>
Description
Use IOS device (Iphone specificly), scroll with the ContentToc open under production mode until the very end of the page, you will realize the highlighter deviate more and more as it progress. Scroll with IOS device (Iphone specificly) under npm run dev mode is fine, but when it comes to production it had problems.
Note: I tested other devices (other than android), they are fine.
Additional context
No response
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ContentToc component and reproduce the reported page on an iPhone in production and development modes, comparing the highlighter position while scrolling to the end. Done means the highlighter stays aligned with the active content section in iOS production without regressing development mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, nuxt, tailwindcss, typescript
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100