Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

v2.0.1-67 error with: content: {ajax: { once: true } } #505

Closed
ZacWolf opened this issue Apr 11, 2013 · 4 comments
Closed

v2.0.1-67 error with: content: {ajax: { once: true } } #505

ZacWolf opened this issue Apr 11, 2013 · 4 comments

Comments

@ZacWolf
Copy link

ZacWolf commented Apr 11, 2013

I just tried the latest nightly v2.0.1-67 and I was seeing a very strange behavior on a qtip with an ajax content component:

jQuery(this).qtip({ 
    content: { 
        text:  jQuery(this).attr('qtip-txt'),
        title: {
            text: jQuery(this).attr('qtip-title'),
            button: true
        },
        ajax: {
            url: MassMail.initParms.url_uiservlet
            ,xhrFields: {
              withCredentials: true
            }
            ,type: "POST"
            ,data: {
                funct: "getusertip",
                cecid: jQuery(this).attr('qtip-txt')
            }
            ,once: true // only fetch the content the first time the tip is shown
        }
    }
    ,show:{
        event: "mouseenter"
        ,solo: false
    }
    ,hide: "mouseleave"
    ,events: {
        render: function(event, api) {
            api.elements.target.bind("click", function() {api.set("hide.event", false); });
        },
        hide: function(event, api) {
            api.set("hide.event", "mouseleave","unfocus");
        }
    },
    style: {
        tip: true,
        classes: 'qtip-shadow qtip-rounded qtip'+jQuery(this).attr('qtip-cls')
    }
});

The first mouseover everything is fine, but on the second mouseover it is making another XHR request, but without the "data" being passed, thus returning unexpected html content.

I rolled back to v2.0.1-37 and it's working correctly again.

@Craga89
Copy link
Contributor

Craga89 commented Apr 12, 2013

Doesn't seem to be happening for me... http://jsfiddle.net/fDavN/5919/

@iFrancois1
Copy link

Happening to me with your jsfiddle. First request is a correct "POST http://fiddle.jshell.net/echo/html/" but all further requests are all "GET http://fiddle.jshell.net/fDavN/5919/show/" , thus returning the whole HTML, clearly visible in Firebug's console.
Tested with latest Firefox (19.0.2), latest Chrome (26.0.1410.64) and IE9.

@ZacWolf
Copy link
Author

ZacWolf commented Apr 16, 2013

Thanks for testing that iFrancois! I've been heads down in other work and haven't been able to re-create my original test case.

@iFrancois1
Copy link

Also happening with latest nightly (v2.0.1-70)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants