First of all thanks for reading, I have never asked a question as I have always found answers in this website by googling my issue, but not this time. So here it goes.
I am using SharePoint on Premises 2013 and I have a page, which contains a webpart (doclib) that I am rendering using JSLink.
What I am doing is overriding two fields and returning the HTML I intend to use for each field, the code renders perfectly using the latest versions of both IE and Google Chrome but here is what happens when I run the script for the first time using Firefox: https://vid.me/Dd3z
As I said, that flicker, which shows the hyperlinks (blue as for some reason the css is not being applied at that time) and quickly changes to what I actually return in JSLink only happens the first time that script runs. So it happens in two cases:
- If I restart the browser
- If I use CTRL+F5 to reload the page
If I just press F5 to reload the page it renders without any flickering and if I visit a different page that also runs that script for a different webpart it also runs fine...so the issue only happens the very first time the script runs.
This is how I am overriding the fields by the way:
fieldJsLinkOverride.Templates.Fields =
{
'LinkFilename': { 'View': multilingue.Translate },
'DocIcon': { 'View': multilingue.Translate }
};
And also, just for context, I am using JSLink to translate the name of the folders in a given doc lib, using AJAX and a webservice that responds to the requests, all of that works fine.
What I have tried:
- Not doing any processing for when I am going to return the HTML, I tried returning a string immediately after calling the method and it still happens.
- I tried loading the js file with the master page because I figured firefox could be downloading it last and that was causing the issue, didn't work.
I am not sure why this is happening and I have sent feedback to the firefox team about it.
Does anyone have any thoughts on this?
Thank you so much for your time!