Pages: 1
Print
Author Topic: When viewing webhelp in Chrome, initial page is wonky  (Read 6724 times)
JoAnne
Member

Posts: 49



« on: January 17, 2012, 03:08:57 PM »

XMetaL Author Enterprise 6.0.1,  Windows 7, generating output as WebHelp.

When I open the WebHelp in Chrome, the first page is short and shows a scrollbar (attached  truncated screen shot). If I resize the browser window the WebHelp snaps to the size it should be and opens correctly after that. It seems to happen only the first time I open the index.html file, and only in Chrome.

Any idea what's causing it and if there's a setting I'm missing or something?




* w_scrollbar.png (30.03 KB, 719x238 - viewed 649 times.)
Logged
tv
Member

Posts: 7


« Reply #1 on: January 29, 2012, 09:06:09 AM »

We also see the same problem in Chrome. I've no solution but thought I'd lend my voice to the problem.
Logged
JoAnne
Member

Posts: 49



« Reply #2 on: February 16, 2012, 12:56:23 PM »

Hasn't anyone found a reason or a workaround for this? Any ideas at all?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: February 16, 2012, 02:07:23 PM »

I'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_out\xmwebhelp\script\webhelp.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.
Logged
JoAnne
Member

Posts: 49



« Reply #4 on: February 16, 2012, 03:48:26 PM »

Thanks, Derek.  I tried that and set it as high as 1500, but it's still not working.  But at least I have a starting point to go from.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #5 on: February 16, 2012, 04:23:43 PM »

In my case I could not get Chrome to refresh the page and reload the JS file for some reason (maybe it just doesn't like to do that for caching reasons). I have not worked with Chrome at all, ever, so no experience there. But restarting it and then reloading the page seems to have fixed it. When I set it to 1000 I can clearly see it not working for the full second and then it kicks in and the resize happens.

Google Chrome version 17.0.963.56 m running on Windows XP
« Last Edit: February 16, 2012, 06:50:10 PM by Derek Read » Logged
twisted
Member

Posts: 15


« Reply #6 on: April 02, 2012, 12:23:53 PM »

In webhelp.css try adding the following:

height: 100%; to #whContent

this is around line 127

#whContent {
   border-left: 1px solid #ccc;
   height: 100%;
}


XMetaL Version#: 6.0.2.070
Chrome Version#: 18.0.1025.142
Logged
JoAnne
Member

Posts: 49



« Reply #7 on: April 02, 2012, 01:51:26 PM »

That did it. Thanks, all!
Logged
Doug_Stuart
Member

Posts: 6


« Reply #8 on: December 13, 2012, 04:23:12 PM »

Adding to this thread to report that I was having this issue with output in Chrome and Safari, and came to the forums to see if it had been dealt with. Happy to see it had, and twisted's fix worked for me, too. Thanks for the resource!

XMetaL Author Enterprise 7.0.0.103
Chrome 23.0.1271.97
Safari 6.0.2 (7536.26.17)
Logged
Scibert
Member

Posts: 25


« Reply #9 on: November 20, 2014, 06:18:06 PM »

Somehow this issue got reintroduced with Chrome 39.

However, I found that adding height: 0px; instead of height: 100%; solves the issue.
Logged
JoAnne
Member

Posts: 49



« Reply #10 on: December 05, 2014, 12:48:51 PM »

Did you happen to log a bug with Chrome about this? After some years of it working right,  my old client is seeing the issue again.  As far as I know, nothing's changed in the XMetal setup, and the ditamap validates just fine.

XMetaL Version#: 7.0.0.111
DITA15 WebHelp transform
Windows 7

Thanks.
« Last Edit: December 05, 2014, 12:58:53 PM by JoAnne » Logged
Pages: 1
Print
Jump to:  

email us