dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.39k stars 3.48k forks source link

Ajax request header not sent when link touched in IE10 #116

Open joeldbirch opened 11 years ago

joeldbirch commented 11 years ago

Love the plugin. Really love it!

I've found an issue that is best described via an example which I have prepared here.

When touching a Magnific Popup ajax link, IE10 (on Surface RT, in my case) does not seem to send the correct ajax request header that server scripts need in order to send back the content without doctype, head element, etc. Clicking the link via a cursor (using a mouse or trackpad) works correctly, however. All other browsers and devices behave correctly.

A link to download a zip of my test case files can be found on the example page I linked to.

joeldbirch commented 11 years ago

FYI, I'm getting around this issue by using the parseAjax callback to modify the response data in the case where the returned content is not exactly what I want.

# (CoffeeScript)
# inside magnificPopup options object…
callbacks:
    parseAjax: (mfpResponse) ->
        data = $(mfpResponse.data)
        unless data.is '.the_content_i_want'
            mfpResponse.data = data.find '.the_content_i_want'

By the way, I realise the issue I've reported could turn out to be an IE10 bug that (possibly) jQuery needs to account for in the way it handles ajax.

dmethvin commented 11 years ago

Has this been reported to Microsoft?

joeldbirch commented 11 years ago

Good point, it does seem like the the most logical thing to do. I'll see what's involved with reporting this to Microsoft.

joeldbirch commented 11 years ago

I have submitted this bug report to Microsoft