DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion When viewing webhelp in Chrome, initial page is wonky

  • JoAnne

    When viewing webhelp in Chrome, initial page is wonky

    Participants 9
    Replies 10
    Last Activity 10 years, 8 months ago

    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?

    Reply

    tv

    Reply to: When viewing webhelp in Chrome, initial page is wonky

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

    Reply

    JoAnne

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    Hasn't anyone found a reason or a workaround for this? Any ideas at all?

    Reply

    Derek Read

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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_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.

    Reply

    JoAnne

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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.

    Reply

    Derek Read

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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

    Reply

    twisted

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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

    Reply

    JoAnne

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    That did it. Thanks, all!

    Reply

    Doug_Stuart

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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)

    Reply

    Scibert

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    Somehow this issue got reintroduced with Chrome 39.

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

    Reply

    JoAnne

    Reply to: When viewing webhelp in Chrome, initial page is wonky

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support