Home › Forums › DITA and XMetaL Discussion › When viewing webhelp in Chrome, initial page is wonky › Reply To: When viewing webhelp in Chrome, initial page is wonky
Reply to: When viewing webhelp in Chrome, initial page is wonky
February 16, 2012 at 8:07 pmI've been having trouble actually running Chrome on my test machines due to an apparent conflict with Symantec antivirus software that causes Chrome to crash at launch. I do have it running now though (just now) and I can see the issue.
A little Googling suggests there is a timing issue with Chrome that causes it to fail to run the code used to resize the iframe containing the topic content. Resizing iframes is a pretty common thing to do so there are lots of workarounds for various browsers to resolve this type of problem, but the only ones I can seem to find that should work are those that discuss delaying that code a little bit. There is already code in place to delay this script (5 milliseconds) which I think is there to fix FireFox but it does not appear to be long enough (at least on my machine) for it to work with Chrome.
Try the following:
1. Locate and open this file for editing in your favourite script / text editor:
...webhelp_outxmwebhelpscriptwebhelp.js
2. Locate this section:
// Resize iframe container and tools pane to full height
$(window).resize(function() {
setTimeout(afterOnResize, 5);
return false;
});
3. Change the delay value from 5 to some higher number. I can't say what the best value is here. In my case it seems that it needs to be at least 200.