Custom Query (18300 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (73 - 75 of 18300)

Ticket Resolution Summary Owner Reporter
#2684 fixed callbcak function is called twice if a bind arror happens alex [email protected]
Description

The problem is in dojo.io.XMLHTTPTransport.bind. The following code starts from line 610.

		if(kwArgs.method.toLowerCase() == "post"){
			// FIXME: need to hack in more flexible Content-Type setting here!
			if (!kwArgs.user) {
				http.open("POST", url, async);
			}else{
        http.open("POST", url, async, kwArgs.user, kwArgs.password);
			}
			setHeaders(http, kwArgs);
			http.setRequestHeader("Content-Type", kwArgs.multipart ? ("multipart/form-data; boundary=" + this.multipartBoundary) : 
				(kwArgs.contentType || "application/x-www-form-urlencoded"));
			try{
				http.send(query);
			}catch(e){
				if(typeof http.abort == "function"){
					http.abort();
				}
				doLoad(kwArgs, {status: 404}, url, query, useCache);
			}
		}else{
			var tmpUrl = url;
			if(query != "") {
				tmpUrl += (tmpUrl.indexOf("?") > -1 ? "&" : "?") + query;
			}
			if(preventCache) {
				tmpUrl += (dojo.string.endsWithAny(tmpUrl, "?", "&")
					? "" : (tmpUrl.indexOf("?") > -1 ? "&" : "?")) + "dojo.preventCache=" + new Date().valueOf();
			}
			if (!kwArgs.user) {
				http.open(kwArgs.method.toUpperCase(), tmpUrl, async);
			}else{
				http.open(kwArgs.method.toUpperCase(), tmpUrl, async, kwArgs.user, kwArgs.password);
			}
			setHeaders(http, kwArgs);
			try {
				http.send(null);
			}catch(e)	{
				if(typeof http.abort == "function"){
					http.abort();
				}
				doLoad(kwArgs, {status: 404}, url, query, useCache);
			}
		}

Before the code, the inFlightTimer is set up. When the http.send throw an exception, the doLoad is called, but the inFlightTimer is not cancelled. So, the callback is called twice, one is in the catch block, on is from the inFlightTimer.

Proposed change:

in the catch block before calling the doLoad:

if (async) clearTimeout(this.inFlightTimer);

#9846 fixed Dijit.Menu disappears unexpectedly Douglas Hays zhaojing
Description

The description of the defect: Dijit.Menu disappears unexpectedly when the mouse hovers among different dijit.MenuItem? frequently.

I probably found the reason: The code "setTimeout(dojo.hitch(popup,"focus"),0)" which use setTimeout() to override the onmousehover event in the function "_openPopup" in the file Menu.js causes the defect. Because when the mouse hovers a menuItem, the submenu of it will be opened and the focus event happens with a little delay because of the timeout, at this time, the mouse move onto the next menuItem quickly then the same thing happens which may cause the two focus events happening at the same time,so the onBlur event of the menu happens for it doesn't know where is the focus now. Then the menu is closed.

A way to fix the defect: Mark the focus timeout in the "_openPopup", then clear the timeout when the menuitem is hovered.(In the onItemHover function in menu)

_openPopup:function(){
    ......
    if(popup.focus){
      if(this.popupFocusTimer){ clearTimeout(this.popupFocusTimer); }//my fix code
      this.popupFocusTimer = setTimeout(dojo.hitch(popup,"focus"),0);//my fix code
    }
} 
onItemHover: function(/*MenuItem*/ item){
   if(this.popupFocusTimer){             //my fix code
      clearTimeout(this.popupFocusTimer);//my fix code
   }
   ......
}
#17830 invalid in ie11, has("ie") is undefined zhans52
Description

in ie11, has("ie") return undefined

Note: See TracQuery for help on using queries.