Opened 9 years ago

Closed 7 years ago

#10775 closed defect (patchwelcome)

IE6 DTL re-render for Select Option does not refresh to newer values

Reported by: dimps Owned by: Neil Roberts
Priority: low Milestone: tbd
Component: DojoX DTL Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

My dynamic form creation using DTL hasseveral interdependant Select Options. The onChange of these Select triggers the refresh of its child Drop Downs - where I update the json data used by the template. FF shows the newer values, but IE6 browser shows old values for the child Drop Downs if their size was lesser than the original values shown. The DOM nodes however show the right values in IE6 as well, even the size of the drop down changes to the new list size - just the values on the page are old.

Change History (3)

comment:1 Changed 9 years ago by dimps

It seems there is a disconnect between the buffer used by DOM and the HTML node - if there is any fix or suggestion that you would recommend to overcome this, it would be a great help.

comment:2 Changed 9 years ago by bill

Component: GeneralDojoX DTL
Owner: changed from anonymous to Neil Roberts

That's pretty weird, maybe you can do a layout hack thing, here's some code that dijit does/used to do for weird problems like this, maybe you can try something similar:

	_layoutHack: function(){
		// summary:
		//		Work around table sizing bugs on FF2 by forcing redraw

		if(dojo.isFF == 2 && !this._layoutHackHandle){
			var node=this.domNode;
			var old = node.style.opacity;
			node.style.opacity = "0.999";
			this._layoutHackHandle = setTimeout(dojo.hitch(this, function(){
				this._layoutHackHandle = null;
				node.style.opacity = old;
			}), 0);
		}
	}

and

	_layoutHackIE7: function(){
		// summary:
		//		Work around table sizing bugs on IE7 by forcing redraw

		if(dojo.isIE == 7){ // fix IE7 layout bug when the widget is scrolled out of sight
			var domNode = this.domNode;
			var parent = domNode.parentNode;
			var pingNode = domNode.firstChild || domNode; // target node most unlikely to have a custom filter
			var origFilter = pingNode.style.filter; // save custom filter, most likely nothing
			while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet
				parent._disconnectHandle = this.connect(parent, "onscroll", dojo.hitch(this, function(e){
					this.disconnect(parent._disconnectHandle); // only call once
					parent.removeAttribute("_disconnectHandle"); // clean up DOM node
					pingNode.style.filter = (new Date()).getMilliseconds(); // set to anything that's unique
					setTimeout(function(){ pingNode.style.filter = origFilter }, 0); // restore custom filter, if any
				}));
				parent = parent.parentNode;
			}
		}
	}

comment:3 Changed 7 years ago by ben hockey

Priority: highlow
Resolution: patchwelcome
Status: newclosed

dtl is unsupported. any further patches are welcome.

Note: See TracTickets for help on using tickets.