Changeset 161


Ignore:
Timestamp:
05/12/05 12:05:21 (14 years ago)
Author:
gogo
Message:

When an editor is not active, the toolbar should not be used. This
change disables the toolbar until the editor is activated (and disables
again when it is deactivated).

This should solve many problems like #202

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r160 r161  
    15601560 
    15611561    var editor = this; 
    1562     this._timerToolbar = setTimeout(function() { 
    1563       editor.updateToolbar(); 
    1564       editor._timerToolbar = null; 
    1565     }, 250); 
     1562    this.enableToolbar(); 
    15661563  } 
    15671564 
    15681565  HTMLArea.prototype.deactivateEditor = function() 
    15691566  { 
     1567    // If the editor isn't active then the user shouldn't use the toolbar 
     1568    this.disableToolbar(); 
     1569 
    15701570    if (HTMLArea.is_gecko && this._doc.designMode != 'off') 
    15711571    { 
     
    15851585              // hurt anything. 
    15861586    } 
     1587 
    15871588    HTMLArea._currentlyActiveEditor = false; 
    15881589  } 
     
    15901591  HTMLArea.prototype.initIframe = function() 
    15911592  { 
     1593    this.disableToolbar(); 
    15921594    var doc = null; 
    15931595    var editor = this; 
     
    21382140HTMLArea.prototype.disableToolbar = function(except) 
    21392141{ 
     2142  if(this._timerToolbar) clearTimeout(this._timerToolbar); 
    21402143  if(typeof except == 'undefined') 
    21412144  { 
Note: See TracChangeset for help on using the changeset viewer.