question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] v-toolbar height bug on Chrome when SSR with Nuxt

See original GitHub issue

Versions and Environment

Vuetify: 1.2.5 Vue: 2.5.17 Nuxt: 2.1.0 Browser: Chrome 69.0.3497.100 OS: macOS 10.13.6

Steps to reproduce

No link sorry, as the bug requires Nuxt in production mode.

In terminal:

npx create-nuxt-app toolbar-bug

Chose Vuetify when asked for a UI framework

cd toolbar-bug

Open /layouts/default.vue, change the “drawer” data to false so you can better see the bug

npm run build
npm run start

Go to localhost:3000 with Chrome. Refresh the page. At each refresh you can see the toolbar height change after the page loads. If you disable javascript in Chrome (chrome://settings/content/javascript) the toolbar height does not change

Expected Behavior

Nuxt server side renders the toolbar with the correct height

Actual Behavior

Nuxt server side renders the toolbar with a height, then client side renders toolbar with another height

Reproduction Link

No link sorry, as the bug requires Nuxt in production mode.


Additional Comments:

I tried to find the minimal code where the bug happens. It appears that if you remove the two navigation drawers AND all the buttons on the left of the toolbar title, then there is no bug.

I have no idea if this belongs here or on Nuxt issues page.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
KaelWDcommented, Apr 10, 2019

The toolbar height is set with JS, and the server does not know the client’s screen size so it uses the mobile breakpoint. The material design specification is for 56px on mobile and 64px on desktop, so the height has to change once the JS has been executed. If you don’t like this then don’t use SSR.

5reactions
magyarbcommented, Jun 16, 2019

I am having the same issue. It could be solved by removing the js that sets the height, and do it in css instead. It would look something like this, respectively for the three breakpoints:

@media only screen and (min-width: 959px) {
  div.v-toolbar__content{
  height: 64px;
 }
}

Of course the v-content’s top padding should be set in css too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server Side Rendering - Nuxt
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in...
Read more >
URL Inspection Tool - Search Console Help - Google Support
Type the fully-qualified URL to inspect in the inspection search bar at the top of any Search Console screen. The URL must be...
Read more >
Change Log - /grid - Kendo UI for Angular - Telerik
Learn what changes we have made in our Angular /grid package.
Read more >
Known Problem Report as of Dec 19 2022 4:00AM - Agilent
Click the button and change it to Resume, but it does not do anything as it is waiting for the current sequence to...
Read more >
Browser Support for Reporting Services and Power View
Learn about what browser versions are supported for managing and viewing SQL Server Reporting Services (SSRS), the ReportViewer Controls and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found