[wp-trac] [WordPress Trac] #22266: onbeforeunload alert always triggers with attachments
WordPress Trac
noreply at wordpress.org
Thu Nov 8 16:52:09 UTC 2012
#22266: onbeforeunload alert always triggers with attachments
--------------------------+--------------------
Reporter: duck_ | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.5
Component: Media | Version: trunk
Severity: blocker | Resolution:
Keywords: |
--------------------------+--------------------
Comment (by azaozz):
Yeah, the logic is pretty simple: there's a var isClean = true; that is
changed to false onpaste and onkeydown. Both callbacks are removed if any
of them runs or when all views are loaded. After all views are loaded we
check that var and set ed.isNotDirty = true if isClean is true.
It's a bit tricky to sync this with ed.isNotDirty while the views are
loading, trying to figure out the best way (the onbeforeunload event in
the browsers is a "special" one and doesn't behave as a standard event).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22266#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list