Changeset 1042 for branches/new-dialogs/modules/WebKit
- Timestamp:
- 10/01/08 15:52:00 (4 years ago)
- Files:
-
- 1 modified
-
branches/new-dialogs/modules/WebKit/WebKit.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/new-dialogs/modules/WebKit/WebKit.js
r1039 r1042 574 574 * 575 575 * @param node DomNode 576 * @param pos Set to a numeric position inside the node to collapse the cursor here if possible.577 */ 578 579 Xinha.prototype.selectNodeContents = function(node, pos)576 * @param collapseToStart A boolean that, when supplied, says to collapse the selection. True collapses to the start, and false to the end. 577 */ 578 579 Xinha.prototype.selectNodeContents = function(node, collapseToStart) 580 580 { 581 581 this.focusEditor(); 582 582 this.forceRedraw(); 583 583 var range; 584 var collapsed = typeof pos== "undefined" ? true : false;584 var collapsed = typeof collapseToStart == "undefined" ? true : false; 585 585 var sel = this.getSelection(); 586 586 range = this._doc.createRange(); … … 596 596 sel.removeAllRanges(); 597 597 sel.addRange(range); 598 if (typeof pos!= "undefined")599 { 600 if ( pos)598 if (typeof collapseToStart != "undefined") 599 { 600 if (collapseToStart) 601 601 { 602 602 sel.collapse(range.startContainer, range.startOffset);
