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

v-translate crashes on IE11 when trying to translate text passed in as prop #6

Open
Jarzka opened this issue Jul 17, 2018 · 5 comments

Comments

@Jarzka
Copy link

Jarzka commented Jul 17, 2018

Hi

I have the following line on my Vue component:

<span class="omo-purchase-frequency-header__info__time" v-translate>{{ infoText }}</span>

While this component is rendered for the first time on IE11, it works. However, when the component is rendered again with different intoText property value, IE crashes with the following errors:

[Vue warn] Error in nextTick: "Error: Invalid argument:"
Error: Invalid argument.

This bug does NOT happen if v-translate is removed or the {{ infoText }} is replaced with a hardcoded text. In other words, this bug only happens when v-translate is used to translate a text passed in as a property, and the value of that property is changed. I also checked that infoText is never null, all the possible values that are used as intoText are string values and there is a translation for all of them. Also, this bug does not happen on Firefox and Chrome, only IE11.

Plugin version used: 1.2.0
Vue.js version used: 2.5.2, also tested with the latest version 2.5.16 without success

@Jarzka Jarzka changed the title vue-translate crashes on IE11 when trying to translate text passing in as prop v-translate crashes on IE11 when trying to translate text passing in as prop Jul 17, 2018
@Jarzka Jarzka changed the title v-translate crashes on IE11 when trying to translate text passing in as prop v-translate crashes on IE11 when trying to translate text passed in as prop Jul 17, 2018
@Jarzka
Copy link
Author

Jarzka commented Jul 17, 2018

Here is a shot of the IE error:
https://imgur.com/a/BckqfSZ

I just wonder if this has something to do with this:
https://forum.vuejs.org/t/internet-explorer-garbage-collection-on-removed-nodes/17144

@Jarzka
Copy link
Author

Jarzka commented Jul 17, 2018

It seems that this problem can be avoided by writing <span v-translate class="..." v-text="infoText"></span> instead of using {{ infoText }}

@Jarzka
Copy link
Author

Jarzka commented Jul 18, 2018

Actually, I was wrong. Using v-text never crashes but the prop is also never translated. I went back to using {{ infoText}} and noticed that even though Chrome and Firefox do not crash, the property is never translated.

@javisperez
Copy link
Owner

Wow 🤔 this is a funky one, i need to debug this deeper, i don't really have access to IE11 but i'll try to get a VM and make some tests, thanks for reporting and for your patience 🙏

@Jarzka
Copy link
Author

Jarzka commented Jul 22, 2019

Yes, it is. Anyway, no hurry to fix it anymore. Our app hit production 11 months ago using i18 library. We would have sticked with v-translate, but unfortunately this bug forced us to switch the translation library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants