Changeset 2526

Show
Ignore:
Timestamp:
06/06/08 23:38:11 (20 months ago)
Author:
ddavis
Message:

fixed: IE focuses the editor when saving; we refocus the active element afterwards. BugzID:79983

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/mt-static/js/archetype_editor.js

    r2295 r2526  
    131131    currentTextMode: "_DEFAULT_", 
    132132     
     133 
     134    getHTML: function() { 
     135        /* we can refocus the last selected element, 
     136         * because the superClass getHTML will focus the editor (if IE) */ 
     137        var refocus; 
     138        if ( document.activeElement ) 
     139            refocus = document.activeElement; 
     140         
     141        var html = arguments.callee.applySuper( this, arguments ); 
     142         
     143        try { if ( refocus ) refocus.focus(); } catch(e) { }; 
     144 
     145        return html; 
     146    }, 
     147 
    133148 
    134149    setTextMode: function( mode ) {