1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Major problem with IE8 and jquery in overlay

Discussion in 'Resolved Bug Reports' started by Luciano, Sep 21, 2011.

  1. Luciano

    Luciano Member

    I'm having a stupid issue but maybe there is a simple solution.
    I want to call an overlay, similar to the language chooser or quick navigation.

    I create the template and the css, that works fine.. the overlay is there and works as expected in all browsers as soon as I click the link. it closes with the cancel button.
    me => happy

    when I add a javascript to the template.. (simple example, just a teeny script to check if jquery is there)
    <script type="text/javascript">
        if(typeof(jQuery) === undefined){
            alert("jQuery not loaded")
            alert("Everything OK")
    It works fine in FireFox or in Chrome (answers ok), but has a strange behavior in IE8
    in IE, it tries to do something - the working symbol appears top right - but then it jumps as if javascript was disabled to the overlay template as full page - and then only prompts ok.

    in the script console of IE (hitting F12) i get following messages:
    (oops, instead of smileys it should be XenForo . OverlayLoader.show() (without the spaces)

    thats it, and the page opens not as overlay, but on a new page. There i get the Everything OK alert.
    But I want it to stay on the same page like it does in FireFox or in Chrome.

    Any help would be very appreciated.

    [EDIT]Just seen this has been moved to open bugs... but could it be that its just me doing something wrong? thats why i had posted it in devel. discussion
  2. Luciano

    Luciano Member

    It is not really a bug.. (it seems to be a jquery bug that has been "worked around" by xenforo.
    if you open the xenforo.js on line: 1327
    there is a comment:

    so the behaviour is "working as designed"

    But, after doing some reading on jquery, I found that it will also fall over on other tags, like <embed>

  3. Mike

    Mike XenForo Developer Staff Member

    While trying to resolve issues with the permalink popup, I ran into this same issue -- so I changed the overlay handler to strip out scripts, create the overlay, and then run the scripts.

    Given that we didn't really support scripts in overlays before, hopefully this method will work.
    Marcus likes this.

Share This Page