[wp-trac] [WordPress Trac] #22266: onbeforeunload alert always triggers with attachments
WordPress Trac
noreply at wordpress.org
Tue Oct 23 22:27:19 UTC 2012
#22266: onbeforeunload alert always triggers with attachments
-------------------+--------------------------
Reporter: duck_ | Type: defect (bug)
Status: new | Priority: normal
Milestone: 3.5 | Component: Media
Version: trunk | Severity: normal
Keywords: |
-------------------+--------------------------
'''Steps'''
1. Create a post with attachments in it
1. Visit the post's edit screen
1. Navigate away without modification and see an alert about "The changes
you made will be lost..."
Trying to press "Update" and then leaving gives the same result.
'''Cause'''
`tinymce.activeEditor.isDirty()` is always returning true because
attachments are lazy loaded with individual XHRs and so the editor's
`startContent` property doesn't contain the full HTML for an attachment.
Once an attachment model has been loaded then it's re-rendered and the
editor content is different even though the user hasn't made any
modifications.
Related: #21390, #21813, [22012]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22266>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list