Changeset 453 for trunk


Ignore:
Timestamp:
01/18/06 23:22:55 (14 years ago)
Author:
mokhet
Message:

apply _activeElement patch from ticket #656 and fix BSD-style bracing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r452 r453  
    29672967 * @returns null | element 
    29682968 */ 
    2969 HTMLArea.prototype._activeElement = function(sel) 
    2970 { 
    2971   if(sel == null) return null; 
    2972   if(this._selectionEmpty(sel)) return null; 
    2973  
    2974   if(HTMLArea.is_ie) 
    2975   { 
     2969if(HTMLArea.is_ie) 
     2970{ 
     2971  HTMLArea.prototype._activeElement = function(sel) 
     2972  { 
     2973    if((sel == null) || this._selectionEmpty(sel)) 
     2974    { 
     2975      return null; 
     2976    } 
     2977 
    29762978    if(sel.type.toLowerCase() == "control") 
    29772979    { 
     
    29802982    else 
    29812983    { 
    2982  
    29832984      // If it's not a control, then we need to see if 
    29842985      // the selection is the _entire_ text of a parent node 
     
    30133014      return null; 
    30143015    } 
    3015   } 
    3016   else 
    3017   { 
     3016  }; 
     3017} 
     3018else 
     3019{ 
     3020  HTMLArea.prototype._activeElement = function(sel) 
     3021  { 
     3022    if((sel == null) || this._selectionEmpty(sel)) 
     3023    { 
     3024      return null; 
     3025    } 
     3026 
    30183027    // For Mozilla we just see if the selection is not collapsed (something is selected) 
    30193028    // and that the anchor (start of selection) is an element.  This might not be totally 
     
    30353044    } 
    30363045    return null; 
    3037   } 
    3038 }; 
    3039  
     3046  }; 
     3047} 
    30403048 
    30413049HTMLArea.prototype._selectionEmpty = function(sel) 
Note: See TracChangeset for help on using the changeset viewer.