Skip to content

fix(SSR): avoid errors when rendering with latest Vue#22764

Merged
J-Sek merged 1 commit intomasterfrom
fix/latest-vue
Mar 27, 2026
Merged

fix(SSR): avoid errors when rendering with latest Vue#22764
J-Sek merged 1 commit intomasterfrom
fix/latest-vue

Conversation

@J-Sek
Copy link
Copy Markdown
Contributor

@J-Sek J-Sek commented Mar 25, 2026

fixes #22762

steps to verify:

  1. scaffold new project with Nuxt (Vite project needs more manual work to setup SSR, and it behaves the same anyway)
  2. run it locally
  3. inject code below into HelloWorld.vue
<v-select :items="[1,2,3]" />
<v-number-input />
<v-time-picker />
<v-slider v-model="sliderValue" />
<v-virtual-scroll renderless :height="300" :items="Array.from({ length: 999 }, (_, i) => i)">
  <template v-slot:default="{ item }">Item {{ item }}</template>
</v-virtual-scroll>
const sliderValue = shallowRef(10)
useHotkey('shift+right', () => sliderValue.value++)
useHotkey('shift+left', () => sliderValue.value--)

Note: tested without changes to hotkey.ts and it does not break

@J-Sek J-Sek self-assigned this Mar 25, 2026
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected SSR labels Mar 25, 2026
@alkihis
Copy link
Copy Markdown

alkihis commented Mar 26, 2026

If I can help,
It might be useful to also look at those usages that might be invalid too:

This is no need to handle cases for onUnmounted or onBeforeUnmount, because they're not called during server-side rendering (according to Vue documentation)

@J-Sek J-Sek marked this pull request as ready for review March 26, 2026 14:17
@J-Sek J-Sek closed this Mar 27, 2026
@J-Sek J-Sek reopened this Mar 27, 2026
@J-Sek J-Sek enabled auto-merge (squash) March 27, 2026 09:46
@J-Sek J-Sek disabled auto-merge March 27, 2026 09:46
@J-Sek J-Sek merged commit ecbe030 into master Mar 27, 2026
19 checks passed
@J-Sek J-Sek deleted the fix/latest-vue branch March 27, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SSR T: bug Functionality that does not work as intended/expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][4.0.4] SSR crash in useFocusTrap: onScopeDispose accesses document without IN_BROWSER guard

2 participants