[wp-trac] [WordPress Trac] #7392: Don't create new autosave revision if nothing has changed yet

WordPress Trac noreply at wordpress.org
Sun Jul 28 18:13:17 UTC 2013


#7392: Don't create new autosave revision if nothing has changed yet
---------------------------------------------------+-----------------------
 Reporter:  Otto42                                 |       Owner:  westi
     Type:  defect (bug)                           |      Status:  reopened
 Priority:  normal                                 |   Milestone:  3.6
Component:  Autosave                               |     Version:  2.6
 Severity:  minor                                  |  Resolution:
 Keywords:  has-patch needs-testing autosave-redo  |
---------------------------------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:51 adamsilverstein]:
 > I'm trying to understand whats happening here more fully - you said
 "This should run after TinyMCE is loaded but before tinymce.init()" - can
 you tell me why you aren't using tinymce.Editor.onPreInit?

 Sry, that wasn't clear. Meant the .onAddEditor bit in autosave.js should
 be run after tiny_mce.js is loaded but before the editor instance is
 created with tinymce.init(). That's the best time to use
 `tinymce.onAddEditor` to be able to get the new instance as soon as it's
 ready from outside TinyMCE. To use .onPreInit you need access to that
 instance. Moving that bit to the 'wordpress' TinyMCE plugin and firing a
 custom jQuery event in 7392-6.patch solves this.

 The problem is with doing .save() as soon as the editor is ready. The last
 event fired is editor.onLoad however this seems to still be too soon in
 some cases in WebKit and IE10. Both "loading" content in the iframe and
 "saving" it back to the textarea run a lot of internal filters, cleanup,
 browser quirks fixes, etc.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/7392#comment:52>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list