[wp-trac] [WordPress Trac] #52440: "Leave site? Changes you made may not be saved" on custom taxonomy pages after WP 5.6.1 update

WordPress Trac noreply at wordpress.org
Thu Feb 4 17:55:15 UTC 2021


#52440: "Leave site? Changes you made may not be saved" on custom taxonomy pages
after WP 5.6.1 update
-----------------------------------------+---------------------
 Reporter:  archon810                    |       Owner:  (none)
     Type:  defect (bug)                 |      Status:  new
 Priority:  high                         |   Milestone:  5.6.2
Component:  Editor                       |     Version:  5.6.1
 Severity:  normal                       |  Resolution:
 Keywords:  needs-patch has-screenshots  |     Focuses:
-----------------------------------------+---------------------

Comment (by Clorith):

 The better approach here (sorry, should've mentioned in my initial reply),
 is likely to check that an element exists before trying to get its value
 for a comparison, if the element does not exist it doesn't need the
 comparison check to trigger at all.

 This check would likely just need to live alongside line 713 and 724 in
 `autosave.js`, see if the selector exists before trying to compare against
 it.

 My main concern with [attachment:"52440.diff"] was that manually declaring
 it as `undefined` may have unexpected side-effects elsewhere in this file.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52440#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list