Changeset 445
- Timestamp:
- 07/14/07 00:42:16 (6 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 2 edited
-
_whatsnew.html (modified) (1 diff)
-
editor/_source/classes/fckeditingarea.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/_whatsnew.html
r442 r445 114 114 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/515">#515</a>] Tables in Firefox didn't inherint font 115 115 styles properly in Standards mode.</li> 116 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/321">#321</a>] If FCKeditor is initially hidden in Firefox 117 it will no longer be neccesary to call the oEditor.MakeEditable() function.</li> 116 118 </ul> 117 119 <h3> -
FCKeditor/trunk/editor/_source/classes/fckeditingarea.js
r442 r445 216 216 oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ; 217 217 } 218 catch (e) {} 219 } 218 catch (e) 219 { 220 // In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception 221 // So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again 222 FCKTools.AddEventListener( this.Document, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; 223 } 224 225 } 226 } 227 228 // This function processes the notifications of the DOM Mutation event on the document 229 // We use it to know that the document will be ready to be editable again (or we hope so) 230 function FCKEditingArea_Document_AttributeNodeModified( evt ) 231 { 232 var oDoc = evt.currentTarget ; 233 var oWindow = oDoc.defaultView ; 234 var editingArea = oWindow._FCKEditingArea ; 235 236 // We want to run our function after the events no longer fire, so we can know that it's a stable situation 237 if ( editingArea._timer ) 238 { 239 oWindow.clearTimeout( editingArea._timer ) ; 240 delete editingArea._timer ; 241 } 242 243 editingArea._timer = FCKTools.SetTimeout( editingArea._MakeEditableByMutation, 1000, editingArea ) ; 244 } 245 246 // This function ideally should be called after the document is visible, it does clean up of the 247 // mutation tracking and tries again to make the area editable. 248 FCKEditingArea.prototype._MakeEditableByMutation = function() 249 { 250 // Clean up 251 delete this._timer ; 252 // Now we don't want to keep on getting this event 253 FCKTools.RemoveEventListener( this.Document, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; 254 // Let's try now to set the editing area editable 255 // If it fails it will set up the Mutation Listener again automatically 256 this.MakeEditable() ; 220 257 } 221 258
Note: See TracChangeset
for help on using the changeset viewer.
