Changeset 1035 for branches


Ignore:
Timestamp:
09/23/08 17:03:06 (11 years ago)
Author:
douglas
Message:

CHANGED Ticket #1276 first pass, provide interim support for collapsing to beginning or end of the selection when calling selectNodeContents...

Location:
branches/new-dialogs/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/new-dialogs/modules/Gecko/Gecko.js

    r1008 r1035  
    613613  { 
    614614    range.selectNodeContents(node); 
    615     //(collapsed) && range.collapse(pos); 
    616615  } 
    617616  sel.removeAllRanges(); 
    618617  sel.addRange(range); 
     618  if (typeof pos != "undefined") 
     619  { 
     620    if (pos) 
     621    { 
     622      sel.collapse(range.startContainer, range.startOffset); 
     623    } else 
     624    { 
     625      sel.collapse(range.endContainer, range.endOffset); 
     626    } 
     627  } 
    619628}; 
    620629   
  • branches/new-dialogs/modules/WebKit/WebKit.js

    r1001 r1035  
    593593  { 
    594594    range.selectNodeContents(node); 
    595     //(collapsed) && range.collapse(pos); 
    596595  } 
    597596  sel.removeAllRanges(); 
    598597  sel.addRange(range); 
     598  if (typeof pos != "undefined") 
     599  { 
     600    if (pos) 
     601    { 
     602      sel.collapse(range.startContainer, range.startOffset); 
     603    } else 
     604    { 
     605      sel.collapse(range.endContainer, range.endOffset); 
     606    } 
     607  } 
    599608}; 
    600609   
Note: See TracChangeset for help on using the changeset viewer.