Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The title in head is blink when change locale #151

Closed
thariddler opened this issue Nov 1, 2018 · 14 comments
Closed

The title in head is blink when change locale #151

thariddler opened this issue Nov 1, 2018 · 14 comments
Labels

Comments

@thariddler
Copy link

thariddler commented Nov 1, 2018

Version

v5.3.0

Reproduction link

https://github.com

Steps to reproduce

I set my head() in index.vue. The problem is when I change locale or navigate to another route I see title blink.

If I remove nuxt-i18n or set seo: false everything ok.

head () {
  title: `!!MY TITLE`
}

output.gif

What is expected ?

No blink

What is actually happening?

Blink

This bug report is available on Nuxt community (#c165)
@ghost ghost added the cmty:bug-report label Nov 1, 2018
@thariddler
Copy link
Author

Looks like this is Nuxt page transition issue somewhere

@thariddler thariddler reopened this Nov 1, 2018
@thariddler
Copy link
Author

Just double checked from scratch on blank Nuxt app. This is nuxt-i18n issue.

@thariddler
Copy link
Author

If I set seo: false then there's no issue. But what if I need SEO?

@adi-zz
Copy link

adi-zz commented Nov 1, 2018

@thariddler, is it possible that this issue is in fact caused by kazupon/vue-i18n#408?

@thariddler
Copy link
Author

Forgot to mention, to reproduce this issue you need long page transitions

.page-enter-active {
  opacity: 1;
  transition: opacity 1000ms linear;
}

.page-leave-active {
  opacity: 1;
  transition: opacity 1000ms linear;
}

.page-enter {
  opacity: 0;
}

.page-leave-active {
  opacity: 0;
}

If you have no transition then it's happening instantly and you will not notice the issue.

@adi-zz not sure! It could be because head() manipulation is triggered in wrong time n=by this module and it's conflicting with custom head() in pages.

@stale
Copy link

stale bot commented Jun 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@snitovets
Copy link

snitovets commented Jun 20, 2019

Have the same issue here :(

I just put console.log into head() and it's triggers every few seconds

Found why it's working like that. I have dynamic elements which creates time by time and it's causes this inconvenient behaviour
https://nuxt-community.github.io/nuxt-i18n/seo.html#improving-performance

@parsher
Copy link

parsher commented Jun 26, 2019

I have the same issue too.

How to prevent it?

@stale
Copy link

stale bot commented Aug 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 25, 2019
@rchl
Copy link
Collaborator

rchl commented Aug 26, 2019

Try to disable seo option and use alternative seo method described in https://nuxt-community.github.io/nuxt-i18n/seo.html#improving-performance

@stale stale bot removed the wontfix label Aug 26, 2019
@stale
Copy link

stale bot commented Oct 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 25, 2019
@stale stale bot closed this as completed Nov 1, 2019
@shakhzodkudratov
Copy link

still have same problem

@rchl
Copy link
Collaborator

rchl commented Oct 22, 2020

Create a new issue with a repo that reproduces.

@shakhzodkudratov
Copy link

@rchl thanks for this reply! I solved this issue by removing title property in head inside nuxt.config.js

farnabaz pushed a commit to farnabaz/i18n-module that referenced this issue Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants