Custom Query (18300 matches)


Show under each result:

Results (85 - 87 of 18300)

Ticket Resolution Summary Owner Reporter
#6298 wontfix [patch][cla]bugs in Editor/RichText widget programmatic creation [email protected]

When creating Editor instances programmatically (IDE use case), there is a that keeps RichText from being properly initialized when the widget is not yet attached to DOM.

This problem exists in trunk (1.1rc1)

Here is a summary of the patches necessary to fix the problem:

The first problem is that the the function calls,"before"), but in our scenario the refNode does not yet have a parent node... so place can default to just appendChild as follows:

(rev 13182) dojo/_base/html.js: (see <<< inline) = function(/*String|DomNode*/node, /*String|DomNode*/refNode, /*String|Number*/position){
		//	summary:
		//		attempt to insert node in relation to ref based on position
		//	node: 
		//		id or reference to node to place relative to refNode
		//	refNode: 
		//		id or reference of node to use as basis for placement
		//	position:
		//		string noting the position of node relative to refNode or a
		//		number indicating the location in the childNodes collection of
		//		refNode. Accepted string values are:
		//			* before
		//			* after
		//			* first
		//			* last
		//		"first" and "last" indicate positions as children of refNode.

		// FIXME: need to write tests for this!!!!
		if(!node || !refNode || position === undefined){ 
			return false;	//	boolean 
		node = dojo.byId(node);
		refNode = dojo.byId(refNode);
		if(refNode.parentNode){ // <<< Guard against case when node not yet attached to DOM
			if(typeof position == "number"){
				var cn = refNode.childNodes;
				if((position == 0 && cn.length == 0) ||
					cn.length == position){
					refNode.appendChild(node); return true;
				if(position == 0){
					return _insertBefore(node, refNode.firstChild);
				return _insertAfter(node, cn[position-1]);
				case "before":
					return _insertBefore(node, refNode);	//	boolean
				case "after":
					return _insertAfter(node, refNode);		//	boolean
				case "first":
						return _insertBefore(node, refNode.firstChild);	//	boolean
					// else fallthrough...
				default: // aka: last
					return true;	//	boolean
			return true;

The other place that needs to be fixed is in (r13182)RichText?._drawIFrame, need to test contentDoc being null...


		var contentDoc = this.iframe.contentDocument;
		if (contentDoc){ // possible if RichText created but not yet attached to DOM;
				contentDoc.body.innerHTML = html;

With these two mods, the Editor now works properly in IDE use case. These patches are submitted under ICLA.

-Chris Mitchell, IBM

#6327 worksforme Editor: can't append to last line (Safari 3.1/mac) bill
  1. Bring up mail.html on safari 3.1 mac (note that windows works fine)
  2. click "new message"
  3. click so caret appears after period in "give it a whirl."
  4. type anything (except for the return key)
  5. nothing shows up
#6391 wontfix RichText specifies height as attribute Adam Peller

This is inconsistent with Dijit. Shouldn't it be specified in CSS?

Note: See TracQuery for help on using queries.